PHP Settings after Ubuntu Upgrade

Discussion in 'ISPConfig 3 Priority Support' started by Spaetzle, Mar 12, 2021.

  1. Spaetzle

    Spaetzle Member HowtoForge Supporter

    I updated an Ubuntu Server from 18.04 to 20.04 today. After some problems it seems all things are running smooth now.
    But one setting I am not sure about.
    As with 20.04 PHP was upgraded to 7.4 I changed all PHP settings in "System - Server Config - Web - PHP Settings" and under "System - Server Config - FastCGI" from 7.2 to 7.4.
    But I observerd that in /var/www/php-fcgi-scripts/apps/.php-fcgi-starter the first line points to /etc/php/7.2/cgi/
    Is there a way to change this from the ISPConfig backend or should I change this setting by hand?

    Is there anything else I should consider to do?


    P.S.: As there were some issues when updating ubuntu I can compile a little info for this if someone is interested.
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    After updating the OS, did you run a force update and let the update script reconfigure your services? This is necessary.

    Code: --force
  3. Spaetzle

    Spaetzle Member HowtoForge Supporter

    Sorry for the late feedback.
    It worked with the hint on the last server.
    Now I have updated another server. Here I have unfortunately no success. It seems that no website is using the latest versions of PHP.
    PHP pages are rendered, but still with the old PHP version. For example, access to DBs is not possible, because the corresponding PHP extensions are apparently not loaded.

    Settings for PHP in Server Config - Web are showing to 7.2 directories. Do I need to update those by hand?

    Do you have a good hint here?

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    How did you check which PHP version is being used? Don't look at numbers in any paths or config files, as they are no indication for the PHP version. The best way to check which PHP version a website is using is to create a file in the website directory which contains the phpinfo() command.

    The socket directory does not matter, you can change it though. The path to the PHP binary and start script matter.

    Besides that, the PHP versions of existing sites won't change automatically, you must do a resync on the sites after adjusting the paths.
  5. Spaetzle

    Spaetzle Member HowtoForge Supporter

    Hi Till
    Thanks for looking into this.
    I created a testfile with the "phpinfo()" command. This showed me that 7.2 was used instead of 7.4.
    I tried to do resync (Tools - Resync) with all Websites. The process started but stopped. Out of 12 sites hosted on the server 8 were processed, the last four not. But checking the Websites non worked. Simple PHP sites (as the phpinfo()) were rendered as soon as there was a mysql connection or sqlite connection.
    As said I did an upgradde from Ubuntu 18.04 to 20.04. At the moment the ispconfig version was 3.1.15p3. I did an update of ispconfig after the dist upgrade. Should I do this in another other?
    As this one is a productive server I needed to go back to a backup of the system. So I can't look at the problems at the moment but the updates needs to be done ... so I will give it another try. If anybody has ideas what the problem could be I would be grateful to hear from you ;-)

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    No, first update the OS, then install all packages according to the perfect server guide that matches the new os, then update ispconfig and change paths under system > server config for PHP related settings to use the new PHP version. Then you can do a resync on the sites
    Spaetzle likes this.
  7. Spaetzle

    Spaetzle Member HowtoForge Supporter

    Thanks I will go for another try the next few days and keep you informed if it works out well.

  8. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Other then changing default php as mentioned by @till, you could also to install multiple php and setup the same in ISPConfig panel as well so that you may change any websites php to the version you wanted instead of just using the default php7.4.
    Spaetzle likes this.
  9. Spaetzle

    Spaetzle Member HowtoForge Supporter

    Thanks for your input.
    I found some time to day to upgrade the Server. It worked now. Ahrasis idea was very good as think this can avoid some problems in the future. Thanks for that.
    I found some more problems when upgrading. Both not related to ispconfig.
    But maybe someone other stumbles acreoss this thread.
    1. I needed to stop fail2ban while upgrading. Fails2ban ran amok while upgrading and filled the complete HDD in seconds ;-)
    2. I needed to uninstall roundcube before upgrading as the dbconfig did not work correctly when trying to reconfigure the roundcube database. Upgrade stopped there :-(

    The complete Walkthru for upgrading from Ubuntu 18.04 to 20.04 was:
    • uninstall roundcube
    • stop fail2ban
    • Upgrade Ubuntu
    • install alternative PHP Versions
    • install roundcube
    • install missing packages for ispconfig 3.2
    • update ispconfig
    Thanks Thom, till and ahrasis for your helpful hints.

    till likes this.

Share This Page