Hello guys, I was trying to install new laravel app but i keep getting this error after runing this command laravel new repo-laravel
PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/user/repo-larvel/artisan on line 31 Script php artisan clear-compiled handling the post-install-cmd event returned with an error
will realy appreciate you guys...
Can you mention the source from which you were taking guide for installation. I hope you are using none other than this http://laravel.com/docs/5.1#installation
I was able to resolve this issue. I was using php 5.4.x of which when using composer create-project command it fetches the current version by default. So i upgrade my php version to 5.5.x
thanks
I had this same error. MAMP PRO 2.1.2 on a mac with PHP 5.5.3. I solved it when I realized that running PHP was using the system PHP. I added the 5.5.3 bin directory to the end of my path, but it could also be solved by aliasing php to the appropriate version binary.I had this same error. MAMP PRO 2.1.2 on a mac with PHP 5.5.3. I solved it when I realized that running PHP was using the system PHP. I added the 5.5.3 bin directory to the end of my path, but it could also be solved by aliasing php to the appropriate version binary.
@diemer is correct. I replaced the usr/bin/php file with usr/local/php5-7.0.10/bin/php file and it worked.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community