Support » Installing WordPress » Blank pages – PHP define statement b0rks WordPress

  • The system was just updated to PHP 5.2.5 and now I’m getting blank WordPress pages. The problem is that DEFINE statements somehow cause the blank pages. For an example, see line 2 below:

    <?php
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

    I tried using single quotes, removing the quotes, setting to TRUE and “x”, but the page always dies on that line. Here is the only syntax that works:
    ${WP_USE_THEMES} = TRUE;
    If I change that line in the file, the require dies, presumably because it loads files that contain DEFINE statements. There must be PHP setting gone wrong. Any idea what it is?

Viewing 7 replies - 1 through 7 (of 7 total)
  • are you running the latest version of wordpress?

    BORK BORK BORK

    Thread Starter mslinn

    (@mslinn)

    As you can see, WordPress isn’t causing the problem, so the version of WordPress is not relevant.

    have you doublechecked to see what happens when you something like this:

    <?php
    define("TEST", "Test!");
    echo TEST;
    ?>

    in a seperate file obviously.

    You might want to turn on logging while you do that.

    Thread Starter mslinn

    (@mslinn)

    Yes, I had tried that, as I mentioned in my original post. Strangely enough, the log only gets written when I comment out out the PHP statements. If I re-enable the define, no log entry results.

    no, thats not what you indicated you did.

    Im asking if you put THAT code in another file, and then brought up that file in a browser.

    I am not asking about the quotes difference.

    Thread Starter mslinn

    (@mslinn)

    Peace and love.

    Turns out that after rebuilding PHP and restarting apache it worked.

    My host upgraded from PHP4 to PHP5 today, and now I’m getting a blank page when I try to access /wp-admin/

    I’m not sure what to do, so if anyone could help me I would very grateful!

    I have upgraded to the very latest version (the one that was annonced a week ago, but I’m running the version before that. Would upgrading WP to the trick?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Blank pages – PHP define statement b0rks WordPress’ is closed to new replies.