• I have quick ABSPATH question here.

    In wp-load.php:

    /** Define ABSPATH as this files directory */
    define( 'ABSPATH', dirname(__FILE__) . '/' );

    It seems to me that the value of ABSPATH is being defined with the addition of a trailing slash, ‘/’.

    Also in wp-load.php

    // Die with an error message
    require_once( ABSPATH . '/wp-includes/classes.php' );
    require_once( ABSPATH . '/wp-includes/functions.php' );
    require_once( ABSPATH . '/wp-includes/plugin.php' );

    Now since ABSPATH has been defined with a trailing slash, ‘/’, then:

    Wouldn’t this code:

    // Die with an error message
    require_once( ABSPATH . '/wp-includes/classes.php' );
    require_once( ABSPATH . '/wp-includes/functions.php' );
    require_once( ABSPATH . '/wp-includes/plugin.php' );

    Appear as:

    // Die with an error message
    require_once( '/home/xxx/public_html//wp-includes/classes.php' );
    require_once( '/home/xxx/public_html//wp-includes/functions.php' );
    require_once( '/home/xxx/public_html//wp-includes/plugin.php' );

    Notice double slashes, ‘//‘, in the above code … and this is just in one file, wp-load.php. What about all the other references to ABSPATH found in all the other files inside the /wp-admin/ directory?

    Am I misinterpreting something in the code here?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Niteblade

    (@niteblade)

    Is there a conflict between APC v3.1.2 and WP v2.7 ?

    Thread Starter Niteblade

    (@niteblade)

    Yes there is.

    APC v3.0.19 = Works fine with WP v2.7.
    APC v3.1.2 = Makes WP v2.7 FAIL when accessing admin menu.

    Arg – had the same problem. Very frustrating to debug. Was using APC 3.0.14 and was failing.

    funny, I tried pecl install apc, it pulled 3.0.19 and that failed for me.

    Could it be resolved with a different APC config?

    Ah haw! I’ve been trying to figure out where the hell ABSPATH is being defined. I’m running on Windows and thus for me, ABSPATH on my box looks like:
    C:\wamp\www/

    This is resulting in some code in a plugin failing:
    define("FORMBUILDER_PLUGIN_URL", FORMBUILDER_BLOG_URL . str_replace(ABSPATH, "/", FORMBUILDER_PLUGIN_PATH));

    As, in this case “FORMBUILDER_PLUGIN_PATH” is coming out as:
    https://dev0C:\wamp\www\wp-content\plugins\formbuilder\

    And thus, the ABSPATH string isn’t found in there.

    /facepalm

    Same problem here too with plugins failing while developing on a windows machine!

    In my case it’s WP Post Thumbnail 0.2 beta that won’t work without some tweaking.

    This wouldn’t be the case if the trailing slash wouldn’t be added while defining ABSPATH.

    Hope this get’s straightened out in some future release of WordPress.

    Regards

    Hey Storkontheroof – What did you do to tweak the WP Post Thumbnail 0.2 beta. I’m running WordPress on a localhost and after I choose my image to crop I’m stuck on “Loading…” which prevents me from cropping?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘ABSPATH question’ is closed to new replies.