After Update ISPconfig default remained at old PHP7.0-fpm

Discussion in 'General' started by Sascha Ferley, Jul 18, 2019.

  1. Sascha Ferley

    Sascha Ferley New Member

    Over the weekend we performed a system upgrade from Debian 9 to Debian 10 Buster and upgraded all the modules as well.
    While 90% is working such as the ISPConfig 3 panel (which was previously updated to 3.1.14) the problem is with some sub-sites that were running perfectly previously.
    Initially, we saw errors in regards to the APCu module not running for cache (had ensured that it had been installed), then after it was stating that it was missing other modules, which we knew and verified as being installed for PHP.
    After a phpinfo() on the vhost site we see that it was still running on php7.0, whereas the default for ISPConfig after another phpinfo() was 7.3. Thus for those older sites remained at pointing at the old PHP7.0-fpm vs the system's default of PHP7.3-fpm. We verified this by looking at the /etc/apache2/conf/sites-enabled/<site> and found that it was pointing still at old /var/lib/php7.0-fpm URLs not the new php7.3-fpm.
    Thus as a test, we created a new site with php-fpm enabled and it was still pointing to the old php7.0-fpm URLs.

    After digging around a bit, I have not been able to see where ISPconfig would set the updates to the FPM. I don't care about having multiple php versions allowed and only want it to use the latest 7.3 version.

    Thus is there a location where one can update and correct this?

    Please let me know as it is frustrating that it isn't updating properly.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    And that's where you've gone wrong. There is no way to see within a vhost file which PHP version this site uses. The path /var/lib/php7.0-fpm is not related to the PHP version that the site is using, it's just the name of the central socket directory and no way related to the PHP version of the site. So if this directory would be named /var/lib/this-is-no-php/, then the site would have still PHP and would use the PHP version that you selected in the site.

    So there is nothing wrong with your setup, you just did not realize that the pathname of the systems central socket directory has no relation to a specific PHP version.

    That's really easy, where would one expect the system server configuration for websites? Under System > server config > web. There you find all settings related to PHP-FPM.

    And when you want to update the PHP versions of all sites, either edit the site, change something and press save or run tools > resync to write a new config for all sites.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

  4. jisse44

    jisse44 New Member

    What I did and worked after the "dist-upgrade", as I don't need or use PHP 7.0 anymore:

    mv /etc/php/7.0/fpm/pool.d/*.conf /etc/php/7.3/fpm/pool.d/.
    cp /etc/php/7.0/cli/php.ini /etc/php/7.3/cli/.
    cp /etc/php/7.0/cgi/php.ini /etc/php/7.3/cgi/.
    cp /etc/php/7.0/fpm/php.ini /etc/php/7.3/fpm/.
    mkdir -p /var/lib/php7.3-fpm/
    sed -i -e 's#php7.0-fpm#php7.3-fpm#g' /etc/php/7.3/fpm/pool.d/*.conf
    sed -i -e 's#php7.0-fpm#php7.3-fpm#g' /etc/apache2/conf/sites-enabled/*
    sed -i -e 's#php7.0-fpm#php7.3-fpm#g' /etc/apache2/conf/sites-available/*
    /etc/init.d/php7.0-fpm stop
    /etc/init.d/php7.3-fpm restart
    /etc/init.d/apache2 restart
    You should probably manually change the default PHP in ISPconfig:
    System > Server Config > _serverName_ > Web > PHP Settings
    and replace all 7.0 by 7.3
    You may also need to do a resync via Tools menu.

    If all is OK, you can full remove PHP 7.0 if not needed:
    apt-get remove php7.0 php7.0-cgi php7.0-fpm -y
    apt autoremove -y
    apt-get purge php7.0 php7.0-cgi php7.0-fpm -y

Share This Page