[SOLVED - PEBCAK] Multiple php versions vs. changing php version of existing site

Discussion in 'General' started by pongraczi, May 6, 2017.

  1. pongraczi

    pongraczi Member

    I have several php version installed on debian 8 + ispconfig3.
    Technically theye are working, I can change the php version of a site and the system put its config file into the correct place and able to start with the required php version.
    I found that, if I change a php version for an existing site (say from 7.1.4 -> 7.0.18), the config file moved as expected, but the php-fpm processes did not restart to make it work.
    Instead I have to restart the old php-fpm and restart the new php-fpm to get it work, as the example above:
    I restart php-fpm-7.1.4 (it will remove the changed website from the running process) and I restart the 7.0.18 -> which will pick up the new config and serves the website.
    So, my question: how does it suppose to work? What steps completed after one change the php version of a site?
    These steps are completed (old restart, new restart) by cron once a day or similar?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you have a problem with systemd on your server. processes started by init script can not be restarted with systemd and vice versa. Ensure that you don't use init scripts when systemd is installed, otherwise restarting of services may fail.
  3. pongraczi

    pongraczi Member

    I checked, I have /etc/init.d/ files and /etc/systemd/ directories, too, populated by a lot of services, including these php-fpm files.
    As I did not really messed with init.d/systemd before (I did not really catch the necessary of systemd at all, but this is an other story), so, I am not really sure about how to left the system do its job.
    But it is true, when I tried to stop/start services, I used the formula: /etc/init.d/php5-fpm start/stop
    In the systemd era it seems a bad habit, need to change.
    I restart the server to get a clean view, because at this moment it is sure, it messed up by init.d scripts.
  4. pongraczi

    pongraczi Member

    Confirmed: if I do not play with /etc/init.d/php* manually, systemd is the only service which handling the system and can restart services in correct order which is necessary on php version changes.
    Anyway, I did not find clear answer for this question in the manual (pdf), I only assumed it should work. Of course, it did, until I issued init.d script. PEBCAK again :)

Share This Page