500 & 5xx server errors after upgrading to PHP 7

April 20, 2016 850 views
PHP LEMP Apache CentOS

Hi all,

Im using Apache and PHP, then I upgraded from PHP 5.7 or sth to PHP 7.
After that Google Webmaster/Console screen reported the site had lots of 500 server errors.
Then I fixed it with modifying hosts file and httpd.conf, now the console screen didnt show any error.

Webmaster still reporting lots of increasing 5xx errors, and yesterday server was restarted dozen times like the following log file. Then I didn't know how to fix. Then it's ok again though i didnt do anything. But the server errors seem still existed. What should i do now?

Thank you,


[Sun Apr 10 03:13:27 2016] [notice] Graceful restart requested, doing restart
httpd: apr_sockaddr_info_get() failed for EE.Jan8
httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName
[Sun Apr 10 03:13:27 2016] [warn] NameVirtualHost has no VirtualHosts


[Sun Apr 17 01:43:27 2016] [error] [client ::1] script '/var/www/html/wp-cron.php' not found or unable to stat
[Sun Apr 17 01:44:13 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 17 01:44:13 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Apr 17 01:44:13 2016] [notice] Digest: generating secret for digest authentication ...
[Sun Apr 17 01:44:13 2016] [notice] Digest: done
[Sun Apr 17 01:44:13 2016] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/7.0.5 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips SVN/1.6.11 configured -- resuming normal operations

MY HOST FILE   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
128.199.152.xxx myblog.com
1 Answer

You have some certain errors like file not found (or not enough file permissions to access the file), but main question is - do you really need to upgrade to php7? Probably the best option for you will be to rollback to php5.7 and resume normal operation

  • You are right. Actually i did rollback to thr previous Php by restoring the droplet.
    Thats the perfect answer.

Have another answer? Share your knowledge.