Additional php-fpm not reloading

Discussion in 'Server Operation' started by Mina Gerges, Nov 11, 2015.

  1. Mina Gerges

    Mina Gerges New Member

    Hi,
    ISPConfig 3.0.5.4p8 on Centos 7.1
    I have 2 issues with multiple php version (5.4.16 as default and 5.6.14)
    1) When using php-fpm the configurations are not reloaded
    As i am using Centos 7.1, I created systemctl fpm service, and have a little customized init script to pass the command to systemctl
    when modifying a website "Custom php.ini settings" in ispconfig console, the pool is updated successfully, however the init script is not called to reload the configuration.
    Path to the PHP-FPM init script: /opt/php-5.6.14/php-5.6.14-fpm.init
    file permission 755
    when calling is manually it reloads successfully, so for testing purposes i added an extra log entry to echo whenever it is called, and ispconfig is not calling it at all.

    2) second problem is related to FPM itself
    php_admin_value[zend_extension] = opcache.so
    set in the pool config file is not loading opcache, this line is created by ispconfig when added "zend_extension=opcache.so" in "Custom php.ini settings" in ispconfig console.

    Thank you in advance.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There are 2 issues:

    1) http://bugtracker.ispconfig.org/index.php?do=details&task_id=4012
    2) Your system won't work even if 1) is fixed as ispconfig uses systemctl automatically to reload the php version, your init script that calls systemctl would simply cause a loop as systemd has a fallback to use init scripts on it's own. The solution is to create a systemd service file for the custom php version instead of an init script.
     
  3. Mina Gerges

    Mina Gerges New Member

    Thanks Till,
    2) So opcache doesn't work with FPM!? Good to know then.
    1) figured it out (thanks to you)
    • It doesn't fall back to the init script because the default php-fpm.service gets restarted successfully.
    So, as a workaround till a ISPConfig adds a field to specify additional php service name, I'll add dependency
    1. Add to php-5.x.xx-fpm.service "Requires=php-fpm.service"
    2. Run: systemctl daemon-reload
    Now, additional php versions FPM restarts on configuration changes.
     

Share This Page