Multiple PHP version on CentOS8 - problem

Operating system: Centos
OS version: 8

Firstly I will need to mention, that I have changed the server. I have created a FULL backup on the old server, and on the new server, I have restored the backup - everything worked. I have one domain (virtual server) and ~5 subdomains (sub-virtual servers). In one of them, the project must run PHP => 7.3. By default, the system came with PHP 7.2. So from the docs, I have installed 7.3, 7.4, and 8.0 PHP versions - using the Remi Release repo. After that, I have re-checked the config, and everything looks fine. (later the day, I have rebooted the system - just in case). In the Server Templates, I have created the Default PHP Version (from PHP Options) to be 7.3. Anyway, I needed to edit the specific sub-virtual server PHP version to 7.3 (Server Configuration > PHP Options > PHP Version (from the drop-down) > 7.3) - save (the save button restarted the needed processes, but the PHP version is still 7.2.

How do I check the PHP Version of that virtual server?

  • The system installed on that virtual server requires the PHP version to be >= 7.3, so when I enter the site, I am receiving a message:
    “Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 7.3.0”.”


What I’m missing? The PHP version is still unchanged - staying always on 7.2, despite the options created above?
Thank you for your time.

Can’t help while no experience with backup restore… also not on centos 8

Only asking why you do version 7.3 while that is soon not supported anymore , so if choice better do use 7.4.x version then.

and no i don’t see pics from third party sites! :wink:

Screenshots appear OK. Wonder if composer is detecting system default or domain default. Did you do and in the phpinfo.php



Run the file to see which version it is seeing. Sometimes switching the fpm off (disable php script execution mode) and back on after php-fpm restart (and apache) then tick 7.3 in your options. Default in System Settings → Server Templates → Default → PHP Options, version here can be any of the 4 you have as individual domains can be changed in Server Configuration → PHP Options which you have already done but its not working. Strange.


Thank you for your answer.
Yes - I have tried running the phpinfo() and it shows the 7.2 version of PHP.

Anyway, I have tried your suggestion - switching off the FPM (PHP script execution mode) (The save option restart the necessary processes) and after that, I switched on again and changed the version to 7.3 - it worked. Now everything works fine.

1 Like


Please check or you need the 7.3 and the 7.4 is possible to use do some reading about supported eol and that kind of stuff.

Nice to read your answer and also from @Whoops the solution :wink:

Yes, I have changed the PHP Version to 7.4 - also worked fine.
I have set up the PHP Version to 8 for my next projects (virtual servers).

I prefer just to have 1 version, in the middle - not the oldest and not the latest. Seems to minimise issues :smiley: and easier to maintain - at least for me. Glad it worked. Sometimes its the small things that we normally dont think of but so important.

Anyway thanks for posting some detailed background info. It helps a lot when trying to troubleshoot or to understand the underlying issue. Your screenshots were helpful too.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.