Archive for the paranoia Category

Bizarre bug of the day: I just can’t post the following snippet of code in Wordpress 2.2.1 running in Dreamhost:

        if ((f = fopen(CONFFILE, "r")) == NULL)
                fprintf(stderr, "can't find configuration file\\n"), exit(1);

If I try, the server happily replies with a nice 503 error:

Service Temporarily Unavailable

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

If I replace fopen with “open” or “fopen” (like I did in the instance above) it works fine. Now can someone please explain me what’s going on?

Update: Ok, so Eduardo explained it. It’s mod_security doing something it shouldn’t, and the error message is totally misleading. Case closed (that was fast!).