• David.Doherty

    (@daviddoherty)


    Getting error cannot resolve:

    Warning: require(./wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in \\frigga\home\users\web\b1141\hy.dandoh\fix.php on line 48

    Fatal error: require() [function.require]: Failed opening required ‘./wp-blog-header.php’ (include_path=’.;c:\php\5\pear’) in \\frigga\home\users\web\b1141\hy.dandoh\fix.php on line 48

    The site has been running fine for years but all of a suddon got this error.

    I have upgraded from 3.1.1 to 3.5.1 but the error persist after upgrade.
    I have set to default template to see if template issue no joy.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Justin

    (@jgwpk)

    What is the file fix.php? It is in the root folder it looks like. This file is not native to the WordPress install.

    Have you checked with your hosting company to make sure they did not add this as a security measure?

    Thread Starter David.Doherty

    (@daviddoherty)

    Justin,

    You are correct.

    Here are the contents of fix.pl

    <?php
    function ___wejns_wp_whitespace_fix($input) {
        /* valid content-type? */
        $allowed = false;
    
        /* found content-type header? */
        $found = false;
    
        /* we mangle the output if (and only if) output type is text/* */
        foreach (headers_list() as $header) {
            if (preg_match("/^content-type:\\s+(text\\/|application\\/((xhtml|atom|rss)\\+xml|xml))/i", $header)) {
                $allowed = true;
            }
    
            if (preg_match("/^content-type:\\s+/i", $header)) {
                $found = true;
            }
        }
    
        /* do the actual work */
        if ($allowed || !$found) {
            return preg_replace("/\\A\\s*/m", "", $input);
        } else {
            return $input;
        }
    }
    
    /* start output buffering using custom callback */
    ob_start("___wejns_wp_whitespace_fix");
    ?>
    
    <?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');
    ?>

    will contact my host tech

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning: Require blog header error’ is closed to new replies.