wordpress

Discussion in 'Third-party applications' started by giss68, Oct 23, 2010.

  1. www.empowerghananow.org

    I have spent the whole weekend trying to figure this error out

    Warning: require(./wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in E:\web\empowerg\index.php on line 17

    Fatal error: require() [function.require]: Failed opening required './wp-blog-header.php' (include_path='.;C:\PHP\pear') in E:\web\empowerg\index.php on line 17


    I have reinstall it more than 7 times. The proplem is wp-blog-header.php
    does exist

    the index.php has this
    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    ?>

    Is the problem from the server who cannot find ./wp-blog-header.php'
     
  2. solved by removing */
    thanks
     
  3. Thanks for posting the follow-up.

    Was that file from a theme, or the WordPress distribution itself?
     
  4. Of course not. It's core file from WP distribution.
    Remove "./" from the code is a workaround.

    IMO the issue on your hosting.
    I can not reproduce this issue on my local environment on IIS7 (in the same time I have a bunch of sites ASP.NET & PHP locally).

    Could you please investigate the issue and fix the problem?
     
  5. I just installed 3.0.2 on a test account here without changing anything in the default installation. So I'm not sure there is a problem to fix.
     
    Last edited: Oct 14, 2015
  6. Ray

    Ray

    There seems to be a problem with WordPress when you install it directly on the root. Index.php will throw an error because it has a line that reads --

    require('./wp-blog-header.php');

    The error will be...

    Warning: require(./wp-blog-header.php) [function.require]: failed to open stream:

    I believe its this part "./" that is throwing it off. From all the information I can gather on the Internet it has to do something with how absolute path is handled. I suspect it is handled a little more differently on Linux/Apache then on Windows/IIS.

    The work around is to go to your index.php file, go to the 17 line and change

    require('./wp-blog-header.php');

    to

    require('wp-blog-header.php');

    That should fix it. Now the weird thing about it is that if you install it on a subfolder under the root (subfolder1) you do not need to do this. It finds the path correctly.

    To let you know index.php and wp-blog-header.php are on the same folder level.

    I posted a post in the WordPress forum about this and I'm still waiting a reply from them. It can be a bug with WordPress and how absolute path works in IIS but I will not know until I get an official reply from them. As soon as I do I'll make sure I post it on the forum.
     
  7. Ah, I did install in a subdir. That makes sense.
     

Share This Page