Forum

WordPress = Error 500 Internal Server Error?

Rufas
17 December 2012, 17:32
Hi,

I am trying to install WordPress 3.4.2 on my localhost (/root/Web-Server/wp34) for development, but I am keep getting Error 500 when I try to install it.

The strange thing is - I have successfully installed Joomla 2.5.8 on /root/Web-Server/joomla25 . The installation, admin area and the actual site - everything works.

Feeling doubtful. I try to install phpBB 3.0.11 to see if it works (on /root/Web-Server/phpBB3), and surprisingly it does!

Everything works, except WordPress.

Now I don't know what happened. I tried the error logs at /var/log/hiawatha/error.log but I get nothing. No error. Nothing.

And since WordPress have permalinks (mod_rewrite) set to off by default, I doubt URLToolkit has anything to do with it. Heck, I can't even get the installation screen to work, much less setting it.

Here is my hiawatha.conf:
ServerId = webuser
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log

Binding {
Port = 80
Interface = 127.0.0.1
}

Hostname = 127.0.0.1
WebsiteRoot = /root/Web-Server
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log

#add this stuff to get a perl script working (pplog)...
#QUISP has a binary executable CGI named 'quisp.bin'...
MimetypeConfig = /etc/mime.types
#CGIhandler = /usr/bin/perl:pl
CGIhandler = /usr/bin/php5-cgi:php,php5
CGIextension = pl,bin
ExecuteCGI = yes
#QUISP puts %0D, %0A (carriage-return, line-feed) chars in the url
#(v128), to allow chars below ascii 32 need this...
SecureURL = no
ShowIndex = yes


What went wrong? Any ideas?

- Rufas

P.S. Please notice it is for localhost developement. The sites will never goes live. As long as it is tied to 127.0.0.1 or localhost, I'm good.


Hiawatha version: v6.17.1, cache, IPv6, SSL, URL toolkit, XSLT
Operating System: Puppy Linux Presice 5.4.1
Hugo Leisink
19 December 2012, 09:14
I'm not sure what could cause this. Maybe a CGI timeout? Or PHP requireing too much memory? I have no idea.
Rufas
19 December 2012, 13:54
Is there any way to test? Any form of error message is a good start.

This is from the access.log :
127.0.0.1|Wed 19 Dec 2012 20:45:10 +0800|200|3602||GET / HTTP/1.1|Host: 127.0.0.1|User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121017 Firefox/16.0 SeaMonkey/2.13.1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8|Accept-Language: ja,en-us;q=0.7,en;q=0.3|Accept-Encoding: gzip, deflate|Connection: keep-alive
127.0.0.1|Wed 19 Dec 2012 20:45:13 +0800|200|6132||GET /wp34/ HTTP/1.1|Host: 127.0.0.1|User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121017 Firefox/16.0 SeaMonkey/2.13.1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8|Accept-Language: ja,en-us;q=0.7,en;q=0.3|Accept-Encoding: gzip, deflate|Connection: keep-alive|Referer: http://127.0.0.1/
127.0.0.1|Wed 19 Dec 2012 20:45:18 +0800|500|588||GET /wp34/index.php HTTP/1.1|Host: 127.0.0.1|User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121017 Firefox/16.0 SeaMonkey/2.13.1|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8|Accept-Language: ja,en-us;q=0.7,en;q=0.3|Accept-Encoding: gzip, deflate|Connection: keep-alive|Referer: http://127.0.0.1/wp34/


Anything relevant or useful?

At first I thought some files were corrupted, I tried to redownload it and re-extract all the files again, but still the same.

All files are chown webuser:webgroup and chmod 644 for permission. Directories are chmod 755 . There shouldn't be any problem there either.

Really banging my head on this one. No clue on what happened.

- Rufas
Hugo Leisink
19 December 2012, 18:54
Could it be that Wordpress is generating a 500 error? Perhaps it's a Wordpress issue instead of a Hiawatha issue.

Are you sure the logfiles are writable for Hiawatha? Please check ownership and access rights of logfiles and directories.
Rufas
19 December 2012, 22:58
I'm pretty sure it is WordPress. I tried to install older versions - 3.0.6 = nope, 2.5.1 = nope, 2.0.11 = works! From there 2.1.3 = works, 2.2.3 = works, 2.3.3 = nope , so I think there's something added or changed in between WP 2.2 to 2.3 that caused Hiawatha to be unhappy. Looking at the diff log right now to see if I can find anything.

There log files are writable. The access.log, system.log, error.log and garbage.log are all have the same user:group and same file permission. And I can see they are updated, just without any relevant information to this error 500.

Still trying...
- Rufas
Rufas
20 December 2012, 00:06
I think I found it! On "/wp-includes/function.php", under the function "status_header", if I change the return value from

return @header( $status_header, true, $header );

to

return 0;

IT WORKS! For some reason WP end up calling status_header( 500 ) or maybe wp_die() within the checking loop, but I'm not really sure which part though. Something just went wrong there.

Anyway, thanks for your help, Hugo. If I know anything I'll just file a bug report on wordpress support.

- Rufas
Hugo Leisink
20 December 2012, 14:52
That's good to hear!
This topic has been closed.