Menu

Wordpress define ABSPATH not resolved

2010-10-28
2012-12-07
  • Dave Shaffer

    Dave Shaffer - 2010-10-28

    I am trying to use Dev-PHP to develop a wordpress site. I have run into a major stumbling block in that wordpress defines ABSPATH its local path but when I use it, it is not resolved:  
           require_once( ABSPATH.'LHC_Services.php' );
    The statement that defines it is wp-load statement 20:
           define( 'ABSPATH', dirname(__FILE__) . '/' );

    This works outside of Dev-PHP.

    Any ideas?

    Dave

     
  • Dave Shaffer

    Dave Shaffer - 2010-10-28

    OOPS! Forgot a couple things

    Dev-PHP is at 2.4.0
    localhost on Windows Vista
    XAMPP Lite 1.7.3
       Apache 2.2.14
       PHP 5.3.3
      
    error mesages are:

    Warning: require_once(ABSPATHLHC_Services.php) : failed to open stream: No such file or directory in F:\xampplite\htdocs\LitehausConsulting\MyPages\HomePage.php on line 3

    Fatal error: require_once() : Failed opening required 'ABSPATHLHC_Services.php' (include_path='.;\xampplite\php\PEAR') in F:\xampplite\htdocs\LitehausConsulting\MyPages\HomePage.php on line 3

     
  • Pierre Fauconnier

    Hello Dave,

    Thanks for this accurate report + sorry for the late reply

    > define( 'ABSPATH', dirname(__FILE__) . '/' );
    > require_once( ABSPATH.'LHC_Services.php' );
    > /Warning message/
    > require_once(ABSPATHLHC_Services.php) : failed to open stream

    Well, it seems that the "define" statement has not been executed, because ABSPATH has been substituted to… 'ABSPATH'

    > This works outside of Dev-PHP. Any ideas?
    First, an initialization is missing :)
    Second, you started the program with another php script than the php script which should be called at startup (index.php ?)

    Regards, Pierre

     

Log in to post a comment.

MongoDB Logo MongoDB