Support » Fixing WordPress » Post installation returns “Warning: Cannot modify header information”

  • Resolved Paul


    I’m truly stymied: I’ve just installed the latest version of WordPress on ValueWeb at, and I get the Admin Login page ( However, errors at the top are:

    Warning: Cannot modify header information – headers already sent by (output started at /nfs/cust/7/91/83/838197/web/blog/wp-config.php:1) in /nfs/cust/7/91/83/838197/web/blog/wp-login.php on line 12

    Warning: Cannot modify header information – headers already sent by (output started at /nfs/cust/7/91/83/838197/web/blog/wp-config.php:1) in /nfs/cust/7/91/83/838197/web/blog/wp-login.php on line 24

    When I login a further error appears within the Login box:

    ERROR: WordPress requires Cookies but your browser does not support them or they are blocked.

    I’ve read through support threads, FAQs (, and tried the tips: eliminating blank characters in the wp-config.php, remarking out lines in wp-login.php, renaming/deleting the /plugins/ directory (though no plugins – fresh install), restoring clean files from the ZIP wordpress installation download, all to no avail. I’ve tried a “patched” wp-login.php file found in one of the support threads – no luck. Remarking out the appropriate lines in wp-login.php (24, 314, 315 or others) does make the top error messages go away, but not the cookie warning, nor can I get past the login page. ValueWeb shows PHP 4.4.1 installed (full specs at I use the latest version, fully patched Firefox that allows cookies running on a fully patched Windows Vista Business PC; latest Norton Firewall and AntiVirus – but as others have said, it probably isn’t the browser/PC configuration causing the errors. It does not work under a fully patched IE 7 allowing cookies either.

    Bottom line is the error message does not make sense – there is no blank character or bad PHP string on line 1 of the wp-config.php file, and I’ve made very, very sure. It is:


    … and that is it. Any insight, suggestions, or offers of help would be appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • How about after the final ?> in wp-config?



    Thanks for the suggestion, but I already checked and made sure there was no blank character(s) after the ?> in the wp-config.php file … and the wp-login.php file as well. Any other suggestions?

    Purely unscientifically, and with nothing concrete to back it up, I have a vague memory of someone else once having similar issues traced back to that Norton Firewall… might be worth a search here in the forums.

    If that’s not the case:

    No plugins in the plugin directory? How about setting the theme back to Default — same issue still happen?
    If going to Default fixes it, check through your theme’s functions.php for the usual before/after spacing issue.



    Okay, I tried turning the Norton Firewall off, and the cookies error still came back. (I also turned off most other protections too along with the Firewall). However, I will look through Norton forums for any leads.

    On the plugins, I left the default installation Akismet in there, but did experiment with deleting the plugins directory, renaming the plugins directory, and deleting the Akismet directory all prior to my first post … to no luck.

    As for themes, this is a fresh installation with only the Default theme installed – I haven’t been able to get into the Admin section to make any changes at all. It really is a pristine installation on a service that usually has no issues with WordPress. So, is this latest version causing more of these issues in general?




    the error above

    Cannot modify header information - headers already sent by (output started at /nfs/cust/7/91/83/838197/web/blog/wp-config.php:1) ...

    is always caused by one thing:

    a line break or a space before the opening <?php inside wp-config.pfp

    There are no ifs, ands, buts, about it. I will bet my dog on it.



    Here is the wp-config.php file opened in Notepad and cut-and-paste via select all (password removed):

    // ** MySQL settings ** //
    define('DB_NAME', 'p******l');    // The name of the database
    define('DB_USER', 'p******l');     // Your MySQL username
    define('DB_PASSWORD', '********'); // ...and password
    define('DB_HOST', '');    // 99% chance you won't need to change this value
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!
    // Change this to localize WordPress.  A corresponding MO file for the
    // chosen language must be installed to wp-content/languages.
    // For example, install to wp-content/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');
    /* That's all, stop editing! Happy blogging. */
    define('ABSPATH', dirname(__FILE__).'/');

    I guarantee there are no extra blank characters in line 1. When I “Select All” the highlight does not show any, I cannot backspace from the <, and if I “Delete” at the end of the <?php if brings up the second line on to the first – and that causes a whole new set of error messages.




    Im not going to debate this point — 100 pl have come before and said exactly the same thing, and found themselves mistaken.

    That error message is fullproof. Its output that being is sent before the server sends the header.

    there is also a character showing up as your blog loads, at the very top, thats indicative of something in one of the files that loads first, wp-config.php, wp-settings.php, wp-header.php .. etc..(in that order)

    Its not in the theme file because once the theme loads its gone.

    In fact, YOU can see it right here:

    Thats the source of your problem.

    Do you see THAT in your copy and paste?

    if you look here:

    the first file called inside that is wp-config.php, and since I see it your wp-config.php, that pretty much seals it.



    Okay, yes, using the link, I see it. But no, not in my copy and paste, not in Notepad and not in Expression Web. It wasn’t until I installed PHP Designer that the characters revealed themselves. Problems now solved. Thanks very much for the direction – I just don’t understand 1.) how they got there in a clean install (I assume because I had to edit wp-config.php, but a text editor shouldn’t be adding extraneous characters?!?), and 2.) why the text editor would not display them. A mystery for another day. So thank you whooami very much.

    Also, FYI – that solves the cookie issue as well. So let others having that particular problem know to check for that.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Post installation returns “Warning: Cannot modify header information”’ is closed to new replies.