WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok, this is seriously weird and I have no clue what's going on here. I am using WordPress 3.0.1, I create a new blog post, give it a title, paste the following code into the blog post and hits Save Draft.

<code lang="php">
// Init curl
$request = curl_init();

// Set request options
curl_setopt_array($request, array
    CURLOPT_URL => 'https://www.sandbox.paypal.com/cgi-bin/webscr',
    CURLOPT_POSTFIELDS => http_build_query(array
            'cmd' => '_notify-synch',
            'tx' => $_GET['tx'],
            'at' => $your_pdt_identity_token,
    CURLOPT_CAINFO => 'cacert.pem',

// Execute and get the response and status code
$response = curl_exec($request);
$status   = curl_getinfo($request, CURLINFO_HTTP_CODE);

// Close

Just a code example in my head, but seems like WordPress thinks otherwise, cause when I hit Save Draft, Preview or Publish all I get is a blank page with the following text:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

What in the world is going on here??

share|improve this question

migrated from webapps.stackexchange.com Jun 14 '11 at 4:54

This question came from our site for power users of web applications.

up vote 1 down vote accepted

And of course after I ask the question, I find the solution... Apparently it's caused by a trigger happy Mod_Security.

Adding these lines to the .htaccess file makes it go away nicely:

<IfModule mod_security.c>
  SetEnvIfNoCase Request_URI ^/wp-admin/(?:post|async-upload)\.php$ MODSEC_ENABLE=Off
  SetEnvIfNoCase Request_URI ^/xmlrpc\.php$ MODSEC_ENABLE=Off
  SecFilterDebugLevel 0
  SecFilterDefaultAction "deny,nolog,noauditlog,status:503"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.