PHP doesn't work

2 posts / 0 new
Last post
#1 Sat, 07/08/2017 - 15:19
AndyHCZ

PHP doesn't work

Hi

I'm running VirtualMin on Centos 7. I've got 4 versions of PHP installed - 5.4.16 (/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), 5.4 (mod_php)

PHP scripts just don't seem to work on any of my virtual servers. I get the following errors:

Running FGCID:

[Sat Jul 08 22:08:56.026310 2017] [fcgid:warn] [pid 1826] (104)Connection reset by peer: [client xxx.xxx.xxx.xxx:34728] mod_fcgid: error reading data from FastCGI server [Sat Jul 08 22:08:56.026376 2017] [core:error] [pid 1826] [client xxx.xxx.xxx.xxx:34728] End of script output before headers: test.php

Running CGI wrapper:

[Sat Jul 08 22:18:01.448734 2017] [cgi:error] [pid 3581] [client xxx.xxx.xxx.xxx:34936] End of script output before headers: php5.6.cgi [Sat Jul 08 22:18:03.675335 2017] [cgi:error] [pid 3584] [client xxx.xxx.xxx.xxx:34937] End of script output before headers: php5.6.cgi

Could anyone shed any light on this please? It's driving me mad!

Thanks

Sat, 07/08/2017 - 16:36
AndyHCZ

So I've got it working (well kind of). I commented out the following lines from the httpd.conf file:

RemoveHandler .php RemoveHandler .php5 RemoveHandler .php5.6 RemoveHandler .php7.0 php_admin_value engine Off

The PHP version running is 5.4.16 despite me specifying 5.6.25 in the Virtualmin PHP Config for the default html folder. Anyone able to shed light on this?

Also, if I change the PHP version and reboot, the same original settings return and PHP no longer works.

Topic locked