Added multiple PHP versions with tutorial, sites stay on old version

Discussion in 'Installation/Configuration' started by Gert Wierbos, May 19, 2023.

  1. Gert Wierbos

    Gert Wierbos New Member

    I used this tutorial: howtoforge.com/ispconfig-php-ubuntu/ to add PHP 8.0, 8.1 and 8.2 to my ISPConfig 3.2 Multiserver setup on Ubuntu 20.04. Every seems to work inside ISPConfig (i.e. I can set a website to PHP 8.0), but the websites stay at the default PHP 7.4. I tried restarting services and rebooting the servers, but nothing helps. Is there a step I could have missed? Or something else that could go wrong?

    I have set these settings at a website:
    PHP: PHP-FPM
    PHP Version: PHP 8.0 (but also tried 8.1 and 8.2)

    Every website I try, just stays at PHP 7.4 (the default).
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    you installed the additional php versions on each server?
    you added the additional php version config for *each* server in ispconfig?
    did you copy and paste the same config settings? double check each server / php version combo has the correct paths for that version.

    there really isn't much else to it, if you followed those steps it should all work
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    How did you check that? You can't see it in the vhost config file at all, all numbers mentioned in paths in that file are not the PHP version, even if they might look like. The best way to see the PHP version is by putting a info.php file that contains the phpinfo() function and open that in a browser.

    Code:
    <?php
    
    phpinfo();
    And in case you mean it stays at default in the ISPConfig UI, then try changing it as admin user. if it works, then you have client protection enabled which prevents clients from altering the PHP version.
     
  4. Gert Wierbos

    Gert Wierbos New Member

    I did it for every (web) server in my multiserver setup and checked steps several times... I checked the sites as follows:
    in console on server, I type in: top -u web281 (that's the corresponding website user) and I see that the PHP-FPM processes stay at
    php-fpm7.4. even after reboot etc. PHP_info() also says php-fpm7.4.
    Anything I can check?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    You can use the debug mode to get detailed info what happens when you change the PHP version:

    https://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/

    Likely reasons for PHP version changes not getting applied are wrong settings for the additional PHP versions or changes for sites could not be written at all, in this case you find vhost files with .err file ending in the apache or nginx sites-available folder (plus warnings in the ispconfig log).
     
    ahrasis likes this.

Share This Page