• This post describes a bug in WP 3.1.2. I’m not sure where to report bugs, so I just post this here.

    When I instal a fresh copy of WordPress, the site seems to work fine, but all admin pages are blank except for the login page. The login succeeds (which is apparent because of the “logout” link appearing on the site), but all admin pages are blank (e.g. when I click on an “edit” link, or when I go to the “wp-admin” folder.)

    I traced the error to wp-admin/admin.php, line 30, where it says:

    require_once(dirname(dirname(__FILE__)) . '/wp-load.php');

    This cannot possibly work since the admin.php file is being included from a file in the wp-admin directory, and wp-load is placed one level up.

    I changed it to:

    require_once('../wp-load.php');

    and now it works fine.

    The server is running Apache 2.0 on Solaris, with PHP 5.3.5.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I don’t know if that’s a bug, since it works fine for everyone else (seriously, that code has been in WP for years). That said, there’s nothing in your setup that should be weird! The only thing I remember hearing about PHP 5.3.5 is that someone had to recompile php-memcache, which seems totally unrelated.

    Thread Starter bAum

    (@baum)

    That particular piece of code was only changed with WordPress 3.0. In WP 2.9.2, this piece of code looked as follows:

    if ( defined('ABSPATH') )
    	require_once(ABSPATH . 'wp-load.php');
    else
    	require_once('../wp-load.php');

    This would have worked as well.

    The thing is that the __FILE__ constant in the above snippet equals ‘admin.php’. Using dirname() only makes sense if __FILE__ returns a path, which it doesn’t (at least not on my server).

    So unless my server/php is at fault for returning ‘admin.php’ instead of ‘/www/…/admin.php’, this *is* a bug.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Okay, so it’s been in WordPress for a year ?? It’s only a bug if it’s reproducible, though, and I’ve never seen anyone else report it. It very well might be your PHP/server reporting the URL wrong.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug in admin.php line 30 (incl. bugfix), all admin pages blank’ is closed to new replies.