3
votes

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...

1
Short array syntax was introduced in PHP 5.4... use array('as' => 'default.index', ...)Mark Baker
Are you sure you opened your comments properly looking at the syntax highlight it looks like you are missing the opening /*kaning
@kaning that's a screenshot of Laravel's error page (using Symfony component), not a code editor.abstr
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.matthaeus

1 Answers

7
votes

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'));