Ticket #7087 (closed defect: invalid)

Opened 6 months ago

Last modified 5 months ago

ABSPATH already defined

Reported by: rnt Assigned to: anonymous
Priority: normal Milestone:
Component: Administration Version: 2.6
Severity: major Keywords: abspath notice
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

06/03/08 21:51:31 changed by ryan

06/04/08 18:54:47 changed by sambauers

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');

06/04/08 18:57:42 changed by sambauers

  • status changed from new to closed.
  • resolution set to invalid.

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.

06/11/08 17:27:29 changed by ryan

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

06/17/08 23:47:52 changed by thee17

  • milestone deleted.