Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#7087 closed defect (bug) (invalid)

ABSPATH already defined

Reported by: rnt's profile rnt Owned by:
Milestone: Priority: normal
Severity: major Version: 2.6
Component: Administration Keywords: abspath notice
Focuses: Cc:

Description

When I access to /wp-admin/ (trunk in r8041) I get:

Notice: Constant ABSPATH already defined in /home/rcovarru/svn/wordpress/trunk/wp-config.php on line 26 

When I see the files wp-admin/admin.php and wp-load.php, the constant ABSPATH is re-defined.
¿This produce the NOTICE?

metano:~/svn/wordpress/trunk $ cat -n wp-admin/admin.php | head -n 8 1 <?php 2 define('WP_ADMIN', TRUE); 3 4 if ( defined('ABSPATH') ) 5 require_once(ABSPATH . 'wp-load.php'); 6 else 7 require_once('../wp-load.php'); 8 metano:~/svn/wordpress/trunk $ cat -n wp-load.php | head -n 22 | tail -n 4 19 /** Define ABSPATH as this files directory */ 20 define( 'ABSPATH', dirname(__FILE__) . '/' ); 21 22 if ( file_exists( ABSPATH . 'wp-config.php') ) { metano:~/svn/wordpress/trunk $ 

Change History (5)

#2 @sambauers
17 years ago

There is no redefinition going on in that admin file.

That is a conditional asking if ABSPATH is defined or not.

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

#3 @sambauers
17 years ago

  • Resolution set to invalid
  • Status changed from new to closed

To actually answer your problem. You need to copy the conditional at the bottom of wp-config-sample.php into your wp-config.php or if that is outside your ability, just start from scratch with a new wp-config.php based on the altered wp-config-sample.php in trunk.

#4 @ryan
17 years ago

(In [8070]) Suppress notices while loading config. fixes #6933 see #7087

#5 @thee17
17 years ago

  • Milestone 2.6 deleted
Note: See TracTickets for help on using tickets.