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!).

2 Responses to “Bizarre Wordpress bug?”

  1. Eduardo Habkost says:

    It seems to be the useless f*cking mod_security. You will probably see it crying with fear on your error_log.

    I disable it on all my Dreamhost domains.

  2. Eduardo Habkost says:

    BTW, you disable it unmarking the “extra security” checkbox on the domain configuration page on the Dreamhost panel.

Leave a Reply