Roundcube Community Forum

 

Can't add plugins. Error from composer.phar

Started by tenbob, December 25, 2014, 09:23:19 PM

Previous topic - Next topic

tenbob

Hi. I want to add some plugins to my Roundcube installation but I can't get Composer to work for me. I downloaded composer.phar into the Roundcube root directory of my server. I used Putty to connect as a console and navigated to the root directory. I then ran php composer.phar install

This consistently throws an error as follows.
Parse error:  syntax error, unexpected '<' in /path/to/composer.phar on line 104

I tried with several different versions of composer.phar but all gave the same error with slightly different line numbers. Can anyone suggest what is wrong?

tenbob

Hi. I eventually found the answer to my own question. It turns out I'm using the wrong version of PHP. My hosting provider (1&1) uses different versions of PHP for the webserver and the command line. So phpinfo in the browser shows 5.5.20 whereas the console is running 4.4.9 by default. In the console you need to specify the php version explicitly. In each command replace 'php' with 'php5.5'.