Warning: include_once(/home/llynix/llynix.com/wp-content/plugins/wordpress-support/wordpress-support.php): failed to open stream: Permission denied in /home/llynix/llynix.com/wp-settings.php on line 304

Warning: include_once(): Failed opening '/home/llynix/llynix.com/wp-content/plugins/wordpress-support/wordpress-support.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/llynix/llynix.com/wp-settings.php on line 304
Blog Archive » PHP Code Broken in WordPress » llynix.com

PHP Code Broken in WordPress

June 18th, 2007 @

I just spent the last few days trying to figure out something odd. When I pasted certain lines to post in WordPress, it would cause a 503 error. I eventually narrowed it down to a few particular lines in my last example:

$mydebug = fopen('debug.txt','a'); in a post it causes a 503 error
$file_contents = curl_exec($ch);
fwrite($mydebug,"/nHttp Code: $httpCode/n");

Each one would throw a Service Unavailable 503 error. I got around the problem by tossing a space between the parenthesis and semi-colon but it still bothered me.

Turns out it wasn’t WordPress at all, but rather the Apache module mod_security. This post tells the whole story. The quick fix is to create/modify your wp-admin .htaccess file to include:

SecFilterEngine Off

After that I could easily post this message without flubbing my code.

One Response to “PHP Code Broken in WordPress”

  1. Money, Tech and Internet Guides - Bleepinginternet.com Says:

    Certain PHP code causes 503 error in WordPress…

    Certain PHP code causes 503 error in WordPress
    I’ve just overcome a very annoying problem with WordPress thanks to this blog post:
    I just spent the last few days trying to figure out …

Leave a Reply