[BlueOnyx:17814] Re: Blueonyx 5209R; selectable php version and php-fpm
Michael Stauber
mstauber at blueonyx.it
Tue Jun 16 16:20:13 -05 2015
Hi Dirk,
> on a 5209R server I have installed PHP 5.3, 5.4, 5.5 and 5.6
> Customer is using the PHP-FPM implementation to select which
> version of PHP he wants to use for a site.
>
> So far so good if the customer is doing it by runtime.
> A process like "php-fpm: master process
> (/home/solarspeed/php-5.4/etc/php-fpm.conf)" is staring.
>
> But after a reboot only "php-fpm: master process
> (/etc/php-fpm.conf)" is starting. Not "php-fpm: master process
> (/home/solarspeed/php-5.4/etc/php-fpm.conf)" so the
> site which is using the PHP-FPM implementation
> is not working until change php settings in the GUI
> back from PHP-FPM and switching back to it.
That is a bit weird for a couple of reasons. Whenever a Vsite's PHP
object is modified, a handler runs:
/usr/sausalito/handlers/base/vsite/php_fpm-checker.pl
You can look at it in your browser here:
http://devel.blueonyx.it/trac/browser/BlueOnyx/5209R/ui/base-vsite.mod/glue/handlers/php_fpm-checker.pl
It checks the PHP Pool config file directories for all currently
installed PHP versions to see if a PHP-FPM instance has any pool files.
If so, then this is an indication that this instance of PHP-FPM is being
used.
If Vsite has a PHP-FPM config file in one of the PHP-FPM pools, then
this script runs two commands:
service_set_init($known_php_services{$phpVer}, 'on');
service_run_init($known_php_services{$phpVer}, 'restart');
The first one will issue a "systemctl enable php-fpm-5.3" (for example)
and the second one will issue a "systemctl restart php-fpm-5.3".
It does that for all PHP-FPM instances that have a matching PHP package
installed.
Except: The master PHP-FPM for the OS supplied PHP will always be
enabled and running.
Likewise the extra PHP-FPM pools (if enabled) get added to
ActiveMonitor's monitoring of services.
I have tested this extensively and it seemed to work. But certainly
there must be a glitch somewhere that affects you.
Can you please run these commands on that box and report back what they say?
systemctl is-enabled php-fpm-5.3
systemctl is-enabled php-fpm-5.4
systemctl is-enabled php-fpm-5.5
systemctl is-enabled php-fpm-5.6
ls -k1 /etc/php-fpm*/
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list