[wp-trac] [WordPress Trac] #18174: wp-load.php dirname(ABSPATH) changes to wrong directory.

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 19 14:56:34 UTC 2011


#18174: wp-load.php dirname(ABSPATH) changes to wrong directory.
--------------------------+-----------------------------
 Reporter:  amereservant  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Filesystem    |    Version:  3.2.1
 Severity:  major         |   Keywords:
--------------------------+-----------------------------
 On line 31 of my '''wp-load.php''' file, I have the following:

 {{{
 } elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && !
 file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) {
 }}}
 The problem is with the '''dirname(ABSPATH)''' part since I was installing
 it into a sub-directory and this causes it to convert ABSPATH to the
 parent directory instead.  I caught this when I had a temporary wp-
 config.php file in my parent directory and the install screen would never
 load.

 The fix should be changing '''dirname(ABSPATH)''' to
 '''realpath(ABSPATH)''' or to just use the ABSPATH constant and remove the
 forward slash from line 31.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18174>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list