• The “include” process in WordPress relies heavily on two PHP features: the magic __FILE__ constant and the ability to include files from the parent directory (i.e. “include(‘../wp-config.php’);”).
    Unfortunately, on some installations, these features can be disabled for security reasons or simply unreliable. My situation (mod_php 4.2.3 on OpenBSD 3.4) was one of them: __FILE__ behaved pretty oddily and php didn’t allow me to include files specified as “../”.
    The solution: hard work. Thanks to jEdit and its Search/Replace, I’ve modified all the include() and require() statements that:
    – used relative references, or
    – relied on __FILE__
    replacing them with absolute pathnames (like “/home/myaccount/myblog.com/myfile.php”) .
    IMHO, especially __FILE__ is responsible for a good part of the “blank screens” out there… maybe the WP shoud spend some time to fix it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Link to this thread sent to the wp-hackers mailing list.

    I have been wrestling with a blank page problem (all pages blank, all the time) and tried the absolute pathname replacement, but it doesn’t work for me. I still get only blank html pages, even though php and mysql are still working for me (simple test cases outside wordpress verified this). Everything was working fine until I recently recompiled my freebsd kernel to include IPDIVERT (firewall options, not enabled yet). Any other ideas for fixing the my blank pages?

    Which PHP version are you using? Check the include() and require() statements and change them to require_once() (if they’re not obviously in some kind of loop). I’ve probably changed a couple of them here and there.

    Thread Starter toyg

    (@toyg)

    (forgot to login, dammit 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how I fixed the “blank page” error’ is closed to new replies.