Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3627 closed defect (bug) (invalid)

500 Server Error For Long Posts

Reported by: AndyBeard Owned by:
Milestone: Priority: highest omg bbq
Severity: major Version: 2.0.7
Component: General Keywords:
Focuses: Cc:


There seems to be something that has creeped into Wordpress somewhere between 2.04 and 2.06 as I didn't upgrade to 2.05

I am now running 2.07 but the problem was first encountered with 2.06

I started seeing 500 Internal Server Messages being reported within my Google Webmaster Console, and couldn't work out what was causing it.

It was only 5 posts out of 300ish

I tried deleting the posts and recreating them with the same and different slug names, different category names etc.

I went through the posts to see if something had been injected.

As I was deleting parts of the posts, sometimes they would actually display correctly within the preview, but I couldn't pinpoint it so decided to sleep on it.

I am now in the middle of writing a new post that is quite long, and while editing and hitting save occasionally suddenly the preview changed to a view of the front page.
I tried saving the post as private, and it reports a 500 Server Error.

Hosted on a WHM with Hostgator (who incidentally still have 2.04 in Fantastico)

Operating system Linux
Service Status Click to View
Kernel version
Machine Type i686
Apache version 1.3.37 (Unix)
PERL version 5.8.7
Path to PERL /usr/bin/perl
Path to sendmail /usr/sbin/sendmail
Installed Perl Modules Click to View
PHP version 4.4.4
MySQL version 4.1.21-standard

Chose highest priority (2.08), but the site it is on will be upgraded to 2.1RC2 if that is likely to fix it. Severity? Long posts can get lots of links - core content - thus fairly major

The problem post is 139 lines currently 1747 words 10824 characters

Change History (15)

#1 @Viper007Bond
15 years ago

  • Keywords post lenght removed

I just made a 70000 character post and it didn't even phase my test install.

#2 @AndyBeard
15 years ago

It seems to be a problem in the rendering of the single page. When I am logged in I can see that private post on my front page, but when I click on it to view the single post, I receive the 500 server error.

The other pages that have this error actually do this exactly the same, and the_excerpt is not being affected in categories.

#3 @Viper007Bond
15 years ago

Viewing the single post works for me.

It's gotta be something with your server configuration...

#4 @AndyBeard
15 years ago

Just upgraded to 2.1 rc2 - same problem, will setup a new account on the whm and see if I can duplicate it on a totally fresh installation

#5 @AndyBeard
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Going to close this for now - looks like I have managed to get my own site working on 2.1rc2 - not 100% sure what I did to fix it though it might have been a plugin. It isn't server or code related which is good news.

It was weird how it appeared upgrading 2.04 to 2.06

#6 @foolswisdom
15 years ago

  • Milestone 2.0.8 deleted
  • Resolution fixed deleted
  • Status changed from closed to reopened

#7 @foolswisdom
15 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed

#8 @ComputerGuru
15 years ago

This is a real issue, and though I haven't seen it in 2.1.x especially, nothing indicates that it was fixed.

Per the WP-Hackers discussion months ago[1], it's _not_ a server thing, nothing to do with PHP bugs, MySQL memory, time-outs, etc. It's just some really bizarre behaviour that is _not_ present when posting as a page instead of a post.

[1]: http://groups.google.com/group/wp-hackers/browse_thread/thread/c4185117b1a13231/2a4795e439fb6830?lnk=gst&q=vista+review&rnum=1#2a4795e439fb6830

#9 @dwdyer
15 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

I am having the same problem on my hosted site (Apache 1.3.27 on Red Hat 2.4.20-27.7smp, PHP 4.4.2) using Wordpress 2.1.3.

It does seem to only affect long posts (these were posts that I imported from Blogger using the RSS importer). The problem did go away briefly, allowing me to edit my posts, not sure if that is due to something I changed.

The reason I'm adding a comment here is because I seem to have the same problem when using the theme editor. Editing the stylesheet for the Green Marinee theme generates the same error as a long post. I am able to edit the sidebar file without any problems.

#10 @dwdyer
15 years ago

OK, maybe it's not caused by long posts because I've just had the same problem trying to post a single line comment. Switched from Opera to Safari on a whim and was able to finish posting. But Safari still had problems submitting the stylesheet change, so I don't think the browser is at fault (I realise it's a server-side problem but I thought maybe it was triggered by something in the request).

It's very difficult to pin down what causes this. I'm not going to give up on WordPress just yet, but given how frequently it is happening for me, it is very frustrating.

#11 @dwdyer
15 years ago

This might shed some light on things (from the Apache error log). Looks like mod_security is blocking requests because it thinks there is a SQL injection attack:

[Mon May 14 00:52:53 2007] [error] [client] mod_security: Access denied with code 500. Pattern match "(insert:space:?+into.+values|select.+from|bulk:space:?+insert|union.+select)" at POST_PAYLOAD [id "300016"][rev "1"] [msg "Generic SQL injection protection"] [severity "CRITICAL"] [hostname "blog.uncommons.org"] [uri "/wp-admin/post.php"]

#12 @dwdyer
15 years ago

Very strange that saving the same post (with no changes) sometimes causes the problem and sometimes doesn't.

Anyway, I just found this (http://wordpress.org/support/topic/96709), so I'll give that a try tomorrow.

#13 @rob1n
15 years ago

  • Milestone set to 2.4

#14 @rob1n
15 years ago

  • Milestone 2.4 deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

From your description, and a quick look at the forum topic, this seems to be an issue with mod_security. If you can verify this without mod_security running, then reopen this. But, for now, this isn't an issue with WordPress.

#15 @dwdyer
15 years ago

I have disabled mod_security for the WordPress directory and after a couple of tests (including the Green Marinee stylesheet that failed every time previously), it seems to be functioning OK.

I will re-open this issue if the proble does reappear. Otherwise, hopefully these comments will help other people who are having the same problem.

Note: See TracTickets for help on using tickets.