Misleading Path to the PHP-FPM init script

Discussion in 'General' started by mintess, Apr 25, 2020.

  1. mintess

    mintess New Member

    The label "Path to the PHP-FPM init script" under System -> Additional PHP Versions -> PHP-FPM Settings is misleading, or basically wrong if you use it as labeled.

    Path to the PHP-FPM init script: /usr/sbin/php-fpm7.4

    The script /usr/local/ispconfig/server/mods-enabled/web_module.inc.php cuts away the path and uses the basename as servicename.
    The $initcommand adds ".service" and voilà executes systemctl reload php-fpm7.4.service
    Actual - at least in my case - the service is called php7.4-fpm.service

    From an earlier statement in another post you CAN just enter e.g. "php-fpm7.4" without the path, but in fact you must and you must know that this is not the path but the actual service name.

    In my case this caused switching problems from php7.3 <--> php7.4 as you never get informed that the services don't reload/restart.
    Also be aware that if you do restart the services manually, you have to respect the order as the config files are moved to the other pool, so PHP will complain that another PHP is already using this port/file.

    Now this can also be solved by knowing what you do, naming the services the same etc.. but basically the label is wrong. "Path to the script" is wrong.
    m.t.patton likes this.
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What should it be instead?
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    If you would have read the ISPConfig code a bit further, then you would have noticed that this field indeed may contain the path to the init script on systems that contain init scripts. So the label is fine on those systems. But it may indeed also contain the name of the service for none init script-based systems like your servers. And the path you posted in your example is not the path to the php FPM init script of your server btw. What to put in that field is described in detail in the various tutorials that we published on how to add additional PHP versions:

  4. mintess

    mintess New Member

    Telling that everything is fine the way it is doesn't help.
    I encountered this problem, I digged into the code, I found out what to do (not entering a path - as the label said - but the service name instead) and it worked.
    I informed the community.
    If anybody struggles with the same problem, this might be helpful.
    I suggested to change the label, that's it, I'm out.
    Dogbreath and m.t.patton like this.

Share This Page