WordPress.org

Ready to get started?Download WordPress

Forums

[PATCH] wp-admin ABSPATH not defined for wp-config.php (2 posts)

  1. Gimler
    Member
    Posted 6 years ago #

    i have more than one blog so i will symlink the wp-admin folder but for this i must patch the wp-admin/admin.php file

    the problem is that the ABSPATH constant is not defined a this point.

    Index: wp-admin/admin.php
    ===================================================================
    --- wp-admin/admin.php  (revision 12646)
    +++ wp-admin/admin.php  (working copy)
    @@ -1,8 +1,6 @@
     <?php
    -if ( defined('ABSPATH') )
    -       require_once( ABSPATH . 'wp-config.php');
    -else
    -    require_once('../wp-config.php');
    +$config_path = dirname($_SERVER["SCRIPT_FILENAME"]) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'wp-config.php';
    +require_once( $config_path );
    
     if ( get_option('db_version') != $wp_db_version ) {
            wp_redirect(get_option('siteurl') . '/wp-admin/upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])));

    greetings
    Gimler

  2. theapparatus
    Member
    Posted 6 years ago #

    As per the stickies, please don't post code here in the forums unless asked to as it normally doesn't show correctly.

    Patches should go to http://trac.wordpress.org by the way so that the developers can be made aware of it.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic