Missing PHP-FPM pool conffile (Default PHP version)

  • Hi Nuxwin,


    I am not sure if this is related to the PHPSwitcher plugin but I have noticed the error the first time after I have installed the PHP Switcher plugin last week.


    You helped me repair my webserver regarding MySQL 5.7 specialities to get I-MSCP 1.2.11 up and running to use the newest version of PHP Switcher.


    I have restarted my server and look through the logs and I have noticed that the php5-fpm service is not starting up:


    Code
    1. No pool defined. at least one pool section must be specified in config file

    I would assume that PHP 5.6 wouldn't work at all, but I am still able to login the I MSCP console :-). Does PHP5-FPM only work with apache but not with nginx?


    Currently, I have a virtual host (ziin.de) installed which is running with PHP7 from the PHPSwitcher plugin.


    Does this error mean that I have no other virtual host running with php5.6?



    Your SSH key is still installed on my server (menkisyscloudsrv29.menkisys.de), in case you want to take a direct look.



    Thanks,
    Sven

  • @TheRiddler1982


    I've just looked at your server. Not a problem and I will explain why.


    First of all, this error has nothing to do with the PhpSwitcher plugin. You use PHP 7 as provided by the PhpSwitcher plugin which is running as it should:


    Shell-Script
    1. root 27629 0.0 0.6 313412 12568 ? Ss janv.16 0:25 php-fpm: master process (/opt/phpswitcher/php7.0/etc/php-fpm.conf)

    The error comes from the fact that in the /etc/php5/fpm/pool.d/ directory of your default PHP installation (distro), there is not default pool configuration file. This is expected because you don't use PHP 5.6 (distro version) for any of your sites. For historical reasons, the i-MSCP installer/backend remove the default pool configuration file which has been set with the www-data user by the Debian package maintainer. With i-MSCP, PHP is never run through that user.


    For the PHP versions provided by the PhpSwitcher plugin, this problem cannot occur because it ensures that a default pool configuration file is here.


    To resume, the error should occur only if the conditions bellow are met:

    • You don't have any site using the PHP version provided by your distribution
    • You reboot your server or try to start/restart the distro PHP-FPM instance manually

    We will fix that behavior in near future by ensuring that there is always a default pool configuration file as it is done for the PhpSwitcher.


    About the i-MSCP frontEnd (panel)


    The i-MSCP frontEnd is run through Nginx and the PHP version provided by your distribution, but not through PHP-FPM. We currently use spawn-fcgi which is another FastCGI process spawner:

    This explain why you can access the frontEnd without any problem ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hi Nuxwin,


    always a pleasure to read your well written answers!


    I like your idea of a default pool for the distro php as well! As I wanted to change PHP Switcher to work on domain but not on user level using


    Code
    1. perl imscp-autoinstall -dar httpd

    the installer breaks as the php-fpm service cannot be be started.I created a new customer and set the PHP version to the default distro version. Now, I was able to run the configuration given above :-)Another thing: I have noticed that PHP Switcher does not update the PHP distro version. There was an update on Debian 8 from PHP 5.6.14 to PHP 5.6.17 last week.The old version is still listed in the dropdown box. A restart of the underlying services of IMSCP updated the dropdown box (after running above command, everything looked fine :-)).Sven

  • @TheRiddler1982


    The i-MSCP installer should not raise any error normally, even if you don't use the distro (default) PHP version with any of your sites.


    The PhpSwitcher plugin (backend side) only cares about its PHP versions (self-compiled). The i-MSCP backend should normally check for the pool configuration file existence before restarting the distro PHP-FPM instance (default PHP version). I'll try to reproduce the problem and I'll fix it if needed.


    About the default PHP version (apt-get upgrade...)


    Again here, the PhpSwitcher plugin don't handles the distro (default) PHP version. The dropbox is generated dynamically and for the PHP default version, information are taken from current running PHP version (the one used by the panel which is the distro PHP version). PHP package provided by Debian known nothing about the i-MSCP FrontEnd PHP processes and therefore, when you update the distro PHP version, you must not forget to also restart the imscp_panel service.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206