centos 6.9 multiple php versions not working

I have loaded PHP 5.6.25, 7.0.10 and then ran the re-check configuration the errors I get are

The following PHP versions are available : 5.3 (/usr/bin/php-cgi), 5.4.40 (/opt/rh/php54/root/usr/bin/php-cgi), 5.6.25 (/opt/rh/rh-php56/root/usr/bin/php-cgi), 7.0.10 (/opt/rh/rh-php70/root/usr/bin/php-cgi) PHP-FPM support was not detected : No FPM configuration directory found PHP versions have changed to 5, 5.4, 5.6, 7.0 since last check. Regenerating any missing php.ini files.

I cant find any answers as to why the newer versions of PHP wont run

When I choose version PHP 5.6 or 7 wordpress or joomla wont run, just get a server error 500

Operating system CentOS Linux 6.9 Webmin version 1.840 Virtualmin version 5.07 Theme version Authentic Theme 18.48 Time on system Wednesday, May 24, 2017 2:43 PM Kernel and CPU Linux 2.6.32-642.15.1.el6.x86_64 on x86_64 Processor information Intel(R) Xeon(R) CPU L5520 @ 2.27GHz, 8 cores



Howdy -- thanks for contacting us!

After receiving a 500 error, can you take a look in $HOME/logs/error_log to see what Apache/PHP logs there?

It's possible that there's a simple tweak that needs to be made. For example, your website may require a particular PHP module to be installed before it'll work.

this is the error

[Wed May 24 15:24:23 2017] [warn] [client] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Wed May 24 15:24:23 2017] [error] [client] Premature end of script headers: index.php

Hmm, sometimes FCGID doesn't provide very helpful error messages... could you go into Server Configuration -> Website Options, and there try setting the PHP Execution Mode to "CGI"?

After doing that, do you see a different error message after accessing your site?

Changed to cgi mode, checked the website and when PHP 5.4.40 selected it works but when I select PHP 5.6.25 I get the 500 internal server error the same as posted above in the apache error log

this error popped up when in CGI mode with PHP 5.6.25

PHP Warning: PHP Startup: Unable to load dynamic library '/opt/rh/rh-php56/root/usr/lib64/php/modules/mysql.so' - /opt/rh/rh-php56/root/usr/lib64/php/modules/mysql.so: undefined symbol: mysqlnd_connect in Unknown on line 0 [Wed May 24 15:59:37 2017] [error] [client] PHP Fatal error: Directive 'register_globals' is no longer available in PHP in Unknown on line 0 [Wed May 24 15:59:37 2017] [error] [client] Premature end of script headers: php5.6.cgi

Seems like your php.ini file contains out-of-date directives. Try removing the register_globals line from etc/php.ini under the domain's home dir.

Yup that did it !