2
votes

When I run

composer.phar install

I get this error almost at the end of the installation, any ideas?

Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing to install or update Generating autoload files

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/belendez/public_html/laravel/artisan on line 46

Parse error: syntax error, unexpected T_STRING in /home/belendez/public_html/laravel/artisan on line 46 Script php artisan optimize handling the post-install-cmd event returned with an error

enter image description here

I look into the suggested link and it appears that somehow in the middle of the installation it changes from 5.3 to 5.2! If I try to start installation using 5.2 it returns right a way: class 'Phar' not found. Any ideas?

1
Do you have the composer.json in your directory when you execute the command? Are you using Linux? (although this is not that important). Have you check this link getcomposer.org/doc/00-intro.md - Edper
If you are using older php like 5.2 then this could be a problem by the way but looking at your screenshot it looks like your using php 5.3 which should not be a problem. This question by the way is like a duplicate of this question stackoverflow.com/questions/14975613/… - Edper
Yes I have the composer.json in the same directory, using Linux, yes I check getcomposer.org.. yes I´m using php 5.3.23 - ebelendez

1 Answers

2
votes

It seems that issuing only a php command will pick up another version of the interpreter. Try to change all the references to php in your composer.phar file to the one you want actually to be executed (in your case it seems /opt/php53/bin/php).

You can confirm that by simply launching a php -v directly from the command line to see what version your server will pick up