PHP 5.6 unavailable after adding PHP 7

Discussion in 'Installation/Configuration' started by jascha, Nov 10, 2016.

  1. jascha

    jascha New Member

    Hey there,

    I've set up a server with Debian Jessie, ISPConfig 3.1.1, MariaDB, NGINX, PHP 5.6 using a Perfect Server tutorial.
    After completing the tut, I've added PHP 7 as optional PHP version according to this tutorial: https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/

    For some reason, when now changing from PHP7 to default PHP (which should be 5.6) within ISPConfig Site config, PHP7 still remains active.
    I've tried restarting NGINX manually after config change but according to phpinfo, PHP7 remains active.

    What could be wrong? The client has unrestricted limits/access.

    Also (second question): After adding PHP7 using the tutorial above, I noticed it listens to a port, rather than a socket. But by default, the option "Use Socket For PHP-FPM" is active, which then causes an error. Is there any way to add a directive to the main config, that this option is disabled and greyed out for clients chosing PHP7?

    Cheers,
    J
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    When you change php back to Default and hit save, then open the website again, does it show "Default" or does it show PHP 7? If it shows PHP 7 still, you probably enabled "client protection mode" by accident (ie. by editing the website as the admin user) - https://git.ispconfig.org/ispconfig/ispconfig3/issues/4048 If it does show "Default" after saving/reloading, but doesn't actually switch, I'd guess something is messed up in your init scripts, so that the old php daemon didn't get stopped and the new one fails to start because the old one is still using the same port - verify all your "additional php version" configuration. If that doesn't seem to be what's going on, try debugging the cronjob (ie. disable cron, set debug log level, run server.sh by hand).
     
  3. jascha

    jascha New Member

    Hey, thanks for your reply.
    After putting some more hours into it, I finally decided to start over and voilà, it works.

    Thanks!
     
  4. jascha

    jascha New Member

    Forget what I said...

    I let the server run for 2 days and switching PHP versions doesn't work anymore. I made absolutely no changes to the config.
    I can switch the versions in admin panel, but a phpinfo file in the corresponding web folder keeps on showing HHVM, regardless of what I choose. This was working like a charm just 2 days ago.

    :/
     
  5. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Maybe there's an error in the vhost config (eg. custom apache directives?) so when it writes the new vhost file, apache complains and the changes are rolled back. If so you should find a .err file beside your live vhost config file in /etc/apache2/sites-enabled/ (or maybe sites-available?)

    If that's not it, you'll probably have to enable debugging and see what's going on when the ispconfig cron job runs (http://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/)
     

Share This Page