Wordpress on PHP 5.3.0, “General Settings” blank screen bug fix.

September 18th, 2009

I recently ran into a frustrating issue when WordPress (2.8.4) started acting bad once the server was updated to the latest php 5.3.0. The main issue is pretty well documented if you search Google, and is not a WordPress code problem rather a php bug. My issue was that my “General Settings” screen stopped loading, and hung with a mostly blank page. This was nothing more than a pain. I’ll wait to update my php for a real fix, rather than rolling back to 5.2.

Here’s what I did to make the problem go away.

Open your /wp-admin/options-general.php file and look for this:

<select id=”timezone_string” name=”timezone_string”>
<?php echo wp_timezone_choice($tzstring); ?>
</select>

This “wp_timezone_choice” function is the culprit. Until the actual php bug is fixed, this will continue to fail. You can easily fix it by hard coding your timezone as a selected “option” like this:

<select id=”timezone_string” name=”timezone_string”>
<?php echo //wp_timezone_choice($tzstring); ?>
<option value=”America/New_York” selected=’selected’>New York</option>
</select>

Notice how I commented out the function and added the “selected option”. You can update the value to be what ever timezone you live in. Here is a list: http://us3.php.net/manual/en/timezones.php

Hope this helps someone, it made me crazy until I worked out this fix.

Cheers!

Tags: ,

2 Responses to “Wordpress on PHP 5.3.0, “General Settings” blank screen bug fix.”

  1. Nic Marson says:

    Thanks for the well written and clear solution, I wish it had been the problem I have. After updating options-general.php like you instructed my general settings page is still blank. I’ve also tried disabling all my plugins. If I figure out what happened to me I’ll post here.

  2. Andrew says:

    Interesting. The issue (I found) was with the date functions on the server. It’s not a wordpress issue, rather the way php 5.3 handles the timezone. The fix above turns off the function causing the issue, and just hard-codes the “selected” option.

    Let me know how you fix yours. This fix has worked on all the installations I’ve seen with the same blank page.

    Thanks for the feedback!

Leave a Reply

» One or more required feilds missing