[BlueOnyx:19907] Re: PHP version from shell command line

Michael Stauber mstauber at blueonyx.it
Sat Jul 30 23:44:38 -05 2016


Hi Dan,

> From the command line, how do I invoke the upgraded version of PHP within a
> vsite rather than the factory 5.3 version?   I have a PHP script that runs
> from the command line and am only getting the factory default version.

For all versions of BlueOnyx except 5209R that would be this:

/home/solarspeed/php/bin/php

For 5209R it depends on which PHP PKGs you have installed and which ones
you actually want to run the script with. But the paths are similar:

/home/solarspeed/php-5.3/bin/php
/home/solarspeed/php-5.4/bin/php
/home/solarspeed/php-5.5/bin/php
/home/solarspeed/php-5.6/bin/php
/home/solarspeed/php-7.0/bin/php

Pro tip: If the Vsite is using suPHP and has it's own php.ini, you might
want to run the script by pointing it to that php.ini so that you don't
run into open_basedir issues:

/home/solarspeed/php-7.0/bin/php -c /home/sites/<site>/php.ini ...

If it's not using suPHP, you might want to supply your own php.ini to
get around the open_basedir issue. In that case use the one from the
Solarspeed PHP's etc/ directory.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list