WebFaction
Community site: login faq

When I run 'php53 composer.phar create-project symfony/framework-standard-edition path 2.3.0' I get this error 'Parse error: syntax error, unexpected T_STRING in' when using PHP > 5.3 conventions. I suspect that composer.phar is looking for php, instead of utilizing php53. Is there a workaround for making composer find a valid version of PHP?

asked 07 Aug '13, 15:49

quantegy
337
accept rate: 0%


Instead of a bash alias, create a symlink to php53 in your ~/bin directory.

For example:

cd ~
ln -s `which php53` ~/bin/php
export PATH=$HOME/bin:$PATH
curl -sS https://getcomposer.org/installer | php53
php53 composer.phar create-project symfony/framework-standard-edition path 2.3.0

Hope that helps!

permanent link

answered 20 Aug '13, 19:26

seanf
12.2k42136
accept rate: 37%

edited 21 Aug '13, 12:51

Sean, thanks so much! You saved the day =)

(20 Aug '13, 20:05) quantegy

Thank you for this! I had an alias setup but couldn't run "app/console". Also, I was using Magallanes for deployment and it tries to do something like ssh user@server "sh -c \"app/console cache:clear\"". That would also run the wrong php version

(18 Sep '14, 16:19) mattsnowboard

You could try to add an alias,

  1. Open an SSH session.
  2. Open $HOME/.bash_profile in a text editor.
  3. On a new line, add alias php=php53
  4. Save and close the file.
  5. Reload $HOME/.bash_profile. Enter source $HOME/.bash_profile and press Enter.

If this fails you would have to edit the script itself.

permanent link

answered 07 Aug '13, 17:08

johns
5.4k412
accept rate: 23%

Sorry, but that didn't work. It produced the same result. The Phar script is compiled so I don't think I can edit it. I'll see if I can.

(07 Aug '13, 17:27) quantegy
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×9
×2

question asked: 07 Aug '13, 15:49

question was seen: 5,693 times

last updated: 18 Sep '14, 16:19

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM