Additional PHP version is used by default

Discussion in 'Installation/Configuration' started by Elio Tondo, Apr 8, 2026 at 6:32 PM.

Tags:
  1. Elio Tondo

    Elio Tondo New Member

    I have the current ISPConfig 3.3.1p1 installed on an AlmaLinux release 9.7 server. All was working well. PHP is the latest version from Remi, 8.5.4, all sites configured to use PHP-FPM.
    I had the need to run an old site that was not compatible with PHP 8, and I installed an additional PHP version form Remi (PHP 7.4) and I configured it in the System - Additional PHP versions section. Then I specified this version in the configuration of the "old" site, and I verified that this site is now running under PHP 7.4 as desired.
    Later I noticed that also phpMyAdmin and Roundcubemail are now running under PHP 7.4, and not under the default PHP version.
    This is a problem for Roundcubemail that currently requires PHP >= 8.1.
    What is the reason of this strange behaviour, and how can I fix it? Thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Installing other PHP versions can change the default PHP version of the OS, this is not ISPConfig-related btw. and also not related to using that PHP version for a site in ISPConfig. See chapter 6 on how to restore the correct PHP version for your OS: https://forum.howtoforge.com/threads/please-read-before-posting.58408/
     
  3. Elio Tondo

    Elio Tondo New Member

    Thank you for your quick reply. The default PHP version is unchanged, php -v replies with
    "PHP 8.5.4 (cli) (built: Mar 10 2026 23:15:23) (NTS gcc x86_64)".
    Moreover, this PHP version is correctly used by all the websites on the server, apart from the one that is set to use the older PHP version.
    The strange thing is that only when I access a service like phpMyAdmin or Roundcubemail, that are configured by additional files in /etc/httpd/conf.d with an Alias directive (like: Alias /roundcubemail /usr/share/roundcubemail/public_html) and I simply add /roundcubemail to the URL of one of the sites that are running undeer the default PHP 8.5, I get PHP 7.4.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you run all the commands from Chapter 6 and then restarted the web server? If not, please run them.

    php -v command does not show the default PHP version of the web server; it shows you the command-line PHP version of the OS. These are separate PHP binaries and versions on Debian and Ubuntu Linux.
     
  5. Elio Tondo

    Elio Tondo New Member

    Tried all, but they do nothing on RHEL / AlmaLinux, because PHP is not managed by alternatives like on Ubuntu, but by "dnf module" commands.
    Anyway, if I put a file with phpinfo() in the ispconfig directory, I see PHP 8.5.4 that is the default, and the same on all the websites, but on the Roundcube and phpMyAdmin directories I get PHP 7.4. How is this possible?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Neither ISPConfig nor websites created by ISPConfig use or rely on the system PHP version, the configure PHP itself and do not use system default. You have to check the non-ISPConfig parts of your web server config to see where the PHP for RoundCube and PHPMyAdmin is configured and change it there.
     
    Elio Tondo likes this.
  7. Elio Tondo

    Elio Tondo New Member

    Thank you for the hint. I found that the second PHP module installed a conflicting configuration file, that had to be disabled. Now all works as expected.

    I have also some minor issues with config files after upgrades, something that probably needs a small effort to be fixed. Just tell me the right way to submit you the details. Thanks.
     

Share This Page