I'm trying to deploy a symfony2 webapp on a VPS server. That server has a different PHP version installed on web (5.4) and command line client (5.2). In order to install vendors with composer, I cannot use PHP-CLI because of its version (it needs PHAR support, included on PHP 5.3). Is there any way I can use php motor that uses Apache (5.4) on CLI?
I realize that PHP5.4 is installed on /opt/php54
but no bin
folder is inside.
Thanks guys!
EDIT
By the way, which php
command returns /usr/bin/php
which is the PHP52 binary.
You just need to find the PHP54 binary and execute the composer installation.
The binary path depends on the linux distribution.
These commands might help to find it:
which php
whereis php
Please take a look at the /usr
folder and /usr/local/bin/php
.
Or: just place a little script in the web folder with <?php echo PHP_BINDIR; echo PHP_BINARY;
- it will show the path to php.