3

I never had this happen before, but here we go:

Enter image description here

Any ideas?

  • Running php-fpm 5.3
  • Ubuntu 12.04 (Precise Pangolin)

It looks as if the comment is NOT working...

4
  • 2
    Short array syntax was introduced in PHP 5.4... use array('as' => 'default.index', ...) Commented Oct 6, 2013 at 8:34
  • Are you sure you opened your comments properly looking at the syntax highlight it looks like you are missing the opening /* Commented Oct 6, 2013 at 8:43
  • @kaning that's a screenshot of Laravel's error page (using Symfony component), not a code editor. Commented Oct 6, 2013 at 8:59
  • 1
    You can avoid sudden errors like this by making sure your test-environment has the same installation and configuration as the production-environment! Same error confronted me when I was deploying my application on the server: local php version was 5.5 and on prod-server 5.3. Commented Dec 12, 2013 at 11:51

1 Answer 1

7

Using [] as arrays like that only works with PHP 5.4 and up.

See PHP: Arrays

You'll have to use old array syntax for PHP 5.3.

This will work:

Route::get('/', array('as' => 'default.index', 'uses' => 'DefaultController@index'));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.