No Gravatar

Abstract
This seems to be a problem that a few people are experiencing these days when posting with apache hosted wordpress. The symptoms (in my experience) are as follows:

  • You write a post
  • Either a) preview the post, or b) publish the post
  • You get a ‘404′ error
  • Tracking back to the ‘posts’ page gives you a link to the draft/published post
  • Further attempts to edit always result in 404 errors

At this point you try and go back to edit the post and get more 404 errors. This problem seems to be particularly prevalent amongst those blogging on tech matters – using command line terms in their text.


The Culprit: mod_security
There it is – the mod_security module in apache is the most likely culprit. An easy way to find out is by tailing your error log files on your server. Most likely the lines you are interested in will look something like the following:

[Fri May 22 04:28:15 2009] [error] [client 111.111.111.111] ModSecurity: Access
denied with code 404 (phase 4). Pattern match "(?:<title>[^<]*?(?:\\b(?:(?:c(?:
ehennemden|gi-telnet)|gamma web shell)\\b| imhabirligi phpftp)|(?:r(?:emote explorer
|57shell)|aventis klasvayv|zehir)\\b|\\.::(?:news remote php shell injection::\\.|
rhtools\\b)|ph(?:p(?:(?: commander|-terminal)\\b|remoteview)| ..." at RESPONSE_BODY
. [file "/myserver/apache2/template/etc/mod_sec2/modsecurity_crs_45_trojans.conf"]
[line "34"] [id "950922"] [msg "Backdoor access"] [severity "CRITICAL"]
[tag "MALICIOUS_SOFTWARE/TROJAN"] [hostname "mylovelyblog.com"] [uri
"/wp-admin/post.php"] [unique_id "ShaMTkt3zScAACAIbzcAAAAA"]

There is quite a lot of information regarding this on the net – various solutions are proposed regarding how to circumvent the issue. I would take most of them with a pinch of salt! Good luck. I am only editing this once in all likelyhood that mod_security will have it’s way… :)
Update…
As I suspected, mod_security had it’s way and blocked any further editing – This last little update I added into the database itself… (not recommended!)

  • Share/Bookmark

No Comments on “404 Errors on New Posts in Wordpress”

You can track this conversation through its atom feed.

No one has commented on this entry yet.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>