[solved] PHP 7 error 500 after upgrde to ubuntu 16

3 posts / 0 new
Last post
#1 Sat, 01/26/2019 - 10:32

[solved] PHP 7 error 500 after upgrde to ubuntu 16

I upgraded my server to Ubuntu 16 from 14 and it uninstalled php 5 and installed php 7 during the process.

now I get error500

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

The log says:

[Sat Jan 26 11:23:32.460086 2019] [fcgid:warn] [pid 16513] (104)Connection reset by peer: [client] mod_fcgid: error reading data from FastCGI server [Sat Jan 26 11:23:32.460128 2019] [core:error] [pid 16513] [client] End of script output before headers: index.php

Inside php7.conf i disabled the two SetHandler linese

SetHandler application/x-httpd-php SetHandler application/x-httpd-php-source

I also noted it did not install mod_php for 7 so i installed that too I tried mod_php, fcgi, and cgi wrapper all error out for php

Any thoughts?

Sat, 01/26/2019 - 10:56


What error do you see in the Apache error log for that domain ($HOME/logs/error_log) when using the CGI PHP Execution Mode? Sometimes CGI produces better error messages than FCGID.


Sat, 01/26/2019 - 11:11

Hi Andy Thanks of course I'm actively running down thee issue and posting here to log a solution if I find one.

I followed this tutorial https://www.virtualmin.com/node/59956 and installed multiple versions including 7.3 (not documented) and now PHP is running fine no 500s anymore I noted I never saw a php 7.0 configuration file in virtualmin listed now that i installed 7.1,7.2,7.3 they all have one so I think that was the issue

My website returns "error" on the index.php -- I ran that down and that is a Joomla issue.

phpinfo(); works fine so i know php is working. I then looked

phpMyAdmin - Error

The mysqli extension is missing. Please check your PHP configuration. See our documentation for more information.

When I looked for the php.ini file 7.0 did not have one listed virtualmin so I installed 7.0 via the same technique as the tutorial apt-get install php7.0 php7.0-mysql php7.0-cgi php7.0-cli php7.0-fpm

Now it has one. I enabled the mysqli.so and others i needed that solved what actually was a JOOMLA issue of no mysqli.so extension.

The upgrade to Ubuntu 16 clearly just didn't install php 7 correctly, the folders were there but it didn't have a cgi/php.ini

Thanks Andy

Topic locked