Massive PHP errors after upgrading from Ubuntu 14.04 to 16.04

2 posts / 0 new
Last post
#1 Tue, 06/11/2019 - 00:14
cfmmroolet

Massive PHP errors after upgrading from Ubuntu 14.04 to 16.04

I have a Virtualmin installation that was happily running Ubuntu 14.04 with PHP 5.2.xx until tonight. Tried to update to 16.04 in hopes of getting the new PHP version. I'm now unable to load any PHP sites on any of my 4 active domains.

On 3 out of the 4 domains I am getting the following errors:

[Mon Jun 10 23:58:43.324609 2019] [fcgid:warn] [pid 27111] (104)Connection reset by peer: [client IPHERE] mod_fcgid: error reading data from FastCGI server [Mon Jun 10 23:58:43.324652 2019] [core:error] [pid 27111] [client IPHERE] End of script output before headers: index.php

On the 4th domain, which has all web files in a subdirectory softlinked to public_html, the php files are getting downloaded instead of executed. This particular domain was using mod_php until tonight, in an attempt to get it running PHP 7.0.33 I switched it to fastcgi. Not sure what wrapper the rest of the sites were using.

I have commented out all mentions of SetHandler application/x-httpd-php in my php.conf files.

I have attempted to add an FcgidBusyTimeout param to /etc/apache2/sites_available/mydomain.net.conf, this did not work.

I have tried manually resetting the username and usergroup in virtualmin to match username and usergroup that are set for the php files and were working until the upgrade.

Starting to think that the only route to fix this will be to move everything to a new server but I'd really rather not do that if it can be avoided. Any advice you can provide to help me get PHP working would be appreciated.

I have no training as a sysadmin, I have no idea what I'm doing, so I'll need it explained like I'm 5, please. (Sorry.)

Tue, 06/11/2019 - 02:58
cfmmroolet

Update: all 4 sites are back up and running.

The first 3 sites were stuck because for some reason libapache-mod-php and php-mysql didn't come with the kernel upgrade. Once I installed those I was fine.

The 4th site was originally on mod_php. I had to switch it to fcgid using Virtualmin > Domain > Website Options. When I did it added 5 lines to the bottom of my conf that I hadn't seen:

RemoveHandler .php
RemoveHandler .php7.0
php_admin_value engine Off

All THREE of these needed to be commented out.

Topic locked