500 error (nothing in logs?) after Ubuntu upgrade

As far as I understand, by upgrading the OS I also upgraded Apache to 2.4 and there are incompatibilities in how it is configured. I've looked at https://httpd.apache.org/docs/current/upgrading.html and am a bit out of my depth.

I started out with Apache not starting and complaining about syntax errors. I managed to google those away. Now Apache starts but I get a 500 error when trying to load my site. Nothing in the error logs that I can find.

I have looked at this https://www.digitalocean.com/community/ … 2-4-syntax">https://www.digitalocean.com/community/tutorials/migrating-your-apache-configuration-from-2-2-to-2-4-syntax and am pretty sure I need to add the "require all granted" line to my vhosts. I tried one of them to see if it helped, but still get the 500 error when trying to load the site (I'm not sure if I put it at the right place in the conf file).

Does anybody have an idea what to try next? Help would be most welcome. Thanks in advance.

8 Replies

Made progress! pure html site works, and php seems to work too (phpinfo();) – what's not working is… Wordpress. Anybody else had issues after upgrading?

Did you check all error logs?

If you're using a cPanel set up at all, look for an error_log file in your main WP install path.

If you're not, look under /var/log (or check what the errorlog directive is defined as in your phpinfo()), if you can get a phpinfo() file by itself working inside of your WP install directory but not WP, then it's probably just a PHP issue inside of WP and should be logged to whatever the errorlog directive is, or by default the main apache error_log under like /var/log/apache (or something along those lines, been a while since I've used a basic Apache configuration admittedly)

My initial guess however would be that perhaps you've upgraded into PHP7 and have a plugin or something still using mysql_* (which has since been removed from PHP as of v7), causing a fatal.

You could try turning on debug mode in wp-config as well which may echo any fatal errors out to the browser itself rather than just throw the generic 500 error.

I have narrowed it down now to using .htaccess – a blank file yields no error, a file with pretty much anything (tried things from RewriteEngine On to ErrorDocument) in it fails. WordPress runs "fine" without .htaccess.

On a second domain I have set up on the same box, the .htaccess file (same one!) doesn't trigger any errors. I'm trying to set up a wordpress install there to troubleshoot, but am ending up with blank ("blank"?) pages.

Hello Stephtara, did you ever get to the bottom of this? I am encountering the same issue after a recent apt-get upgrade on my Ubuntu 14 box.

There should be a way to start Apache from the command line and observe its operation in the console for debugging.

I was beating my head into the wall and finally was digging through every parameter on my impacted WP sites until I discovered that I had put a line in my xpconfig to workaround a known issue with Updraft Backup and Ubuntu 14.04 32-bit. Apparently the latest php updates fixed the cause of this issue while breaking the workaround.

Topic on workaround here: https://wordpress.org/support/topic/bac … -usrbinzip">https://wordpress.org/support/topic/backup-stuck-on-usrbinzip

This line is what I had added to my wpconfig that caused the 500 error after latest updates.

function gzopen($filename , $mode, $use_include_path = 0 ) { return gzopen64($filename, $mode, $use_include_path); }

I don't imagine this was the issue with others, but there it is.

Hey, I'm glad you were able to get to the bottom of things! But just in case anyone else runs into issues after an upgrade from 2.2 to 2.4, there's actually a few things to look through. We have a guide that could help with this:

https://www.linode.com/docs/security/up … apache-2-4">https://www.linode.com/docs/security/upgrading/updating-virtual-host-settings-from-apache-2-2-to-apache-2-4

Good luck to everyone!


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct