Author Topic: Can't add plugins. Error from composer.phar  (Read 3072 times)

Offline tenbob

  • Newbie
  • *
  • Posts: 2
Can't add plugins. Error from composer.phar
« on: December 25, 2014, 09:23:19 PM »
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
Code: [Select]
php composer.phar install
This consistently throws an error as follows.
Code: [Select]
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?

Offline tenbob

  • Newbie
  • *
  • Posts: 2
Re: Can't add plugins. Error from composer.phar
« Reply #1 on: December 29, 2014, 11:30:54 PM »
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'.