Wordpress Update=500 Internal Server Error

Web hosting discussion, programming, and shared and dedicated servers.
21 posts Page 1 of 3
by atusler » Wed Jul 16, 2014 12:14 pm
I tried to click "Updates" from the Wordpress dashboard and got a 500 Internal Server Error, see below. How can I go about correcting it?

------------------------------------------
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

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

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.41 Server at aboutdisability.com Port 80
by joemuller » Mon Jul 21, 2014 6:01 pm
I've updated the a file (.htaccess) in the commentary part of the site (this appears to be where your wordpress install is). Newer versions of Wordpress tend to subtly break if they're not running on PHP 5.3 or later. The change I made should fix that.

Feel free to send me a private message if you're still having trouble with the site.
I'm a proud employee of Sonic.net! :-)
by atusler » Tue Jul 22, 2014 9:37 am
Works great! Thanks.
by ankh » Sat Aug 16, 2014 12:25 pm
same problem, sent a pm.

I see the topic about the need to create a .htaccess file
at viewtopic.php?f=8&t=629

can you tell us how to update what's described there? It's just 2 lines:

Code: Select all
Options +Indexes

and another topic with a longer version
viewtopic.php?f=8&t=2152

(Maybe those of us hitting this 500 Internal Server Error can all learn something together rather than each figuring it out separately or hiring a programmer)
by joemuller » Sat Aug 16, 2014 4:55 pm
Sure, I'd be glad to share how to fix this. What you'll want to do is edit the '.htaccess' file that lives in the main folder for your site. The most important part is going to be at the top - change or add the following lines:

Code: Select all

Action php-cgi /cgi-bin/php53
AddHandler php-cgi .php
By default (but very likely to change soon), Sonic.net's server assumes you want PHP 5.2. Any modern version of Wordpress requires at least version 5.3 or greater. (Note, the site may *appear* to work with an older version, but parts of it will give 500 errors.)

That's all there is! If you edited a local copy, upload your changes to the site. The upgrade process and/or admin panel should now work.

Happy blogging!
I'm a proud employee of Sonic.net! :-)
by ankh » Wed Aug 20, 2014 10:38 am
Nope, got to the files using Cyberduck, made and uploaded that change, made things worse, now I get the 500 Internal Server Error on trying to get to the blog at all.
Puzzling over it.

Oh, I see why things are a mess: viewtopic.php?f=8&t=2277

Looks like I need to copy out the stuff I want to save, erase all three blog attempts, and use the one-click tool for a fresh start. I'll puzzle over it a bit more before erasing anything.
by joemuller » Wed Aug 20, 2014 10:50 am
Fixed it for you - both of your .htaccess files had "CODE: SELECT ALL" in them - that will definitely make the server unhappy.

Protip: .htaccess files are applied hierarchically - they apply to their current folder and any below. This is good if you want to apply something globally for all your sites or pages, but also frustrating trying to hunt down the problem when something breaks.
I'm a proud employee of Sonic.net! :-)
by ankh » Wed Aug 20, 2014 2:12 pm
thanks, I got stuff there to sort out and clean out, I realize. And I've got to figure out how security works for those directories.

EDIT -- fixing htaccess, and removing extra copies of that file, fixed the problem, thank you.
by jpleb » Sun Oct 12, 2014 10:08 am
Hi, I've been experiencing the same error since last year - specifically, when I try to access certain pages on my wordpress site's admin page, I get the 500 error. One of these is the update page which is obviously pretty important for security.

Late last year a Sonic support person told me to modify my .htaccess file, but it didn't fix the problem. The .htaccess file in the root of my wordpress install (.../jpleb/vectorpoem.com/news) now looks like this:

Code: Select all

# added by jpl 2013-12-28 via sonic.net support
Action php-cgi /cgi-bin/php55
AddHandler php-cgi .php

RewriteEngine On
RewriteCond %{HTTP_HOST} vectorpoem.com$ [NC]
RewriteCond %{REQUEST_URI} ^/.*\.php$
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)\.php(.*) /cgi/jpleb/jpleb_oc_1.cgi$2 [L]
# BEGIN WordPress

# END WordPress
(though at the time they told me to use php53; i changed it to php55 just now to see if that would help anything - it didn't.)

I originally added the "use php53" line at the bottom of the file rather than the top, another thing I changed just to see if it would do anything. My superstition is born of ignorance :/

I don't have any .htaccess files higher up in the directory structure, so I'm kind of out of guesses as to what's wrong. Do changes to .htaccess files take a while to propagate or something? (My understanding is no but I'm a server noob.)

Thanks in advance for any help or advice!
by joemuller » Mon Oct 13, 2014 11:30 am
Looks like you had a leftover copy of .htaccess in the wp-admin directory. (It had the php-cgi lines at the bottom) I've removed it, as the one at the level above has the same stuff (in the right order) Let me know if it works. :-)
I'm a proud employee of Sonic.net! :-)
21 posts Page 1 of 3