• What am I missing?

    The error message is
    Warning: Cannot modify header information – headers already sent by (output started at /home/lensakre/public_html/wp-config.php:1) in /home/lensakre/public_html/wp-login.php on line 12

    Warning: Cannot modify header information – headers already sent by (output started at /home/lensakre/public_html/wp-config.php:1) in /home/lensakre/public_html/wp-login.php on line 24

    thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Warning: Cannot modify header information – headers already sent by (output started at /home/lensakre/public_html/wp-config.php:1

    The first line of your wp-config.php file contains something other than <?php.

    wp-config.php can *not* have anything outside of the <?php and ?> markers. This includes blank lines, spaces, anything. The very first characters must be <?php and the very last ones must be ?>. Nothing else will work.

    There can’t be any space after the closing ?> either, so check that as well.
    Nathan

    Thread Starter awangr

    (@awangr)

    this is the content of my wp-config.php

    <?php
    define(‘DB_NAME’, ‘lensakre_lensakreatifDB’); // The name of the database
    define(‘DB_USER’, ‘deleted’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘deleted’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 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 = ‘lensakre_’; // 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 de.mo 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__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>

    It’s irrelevant what the content of you wp-config file is. Open your wp-config file in notepad or some other simple text editor, if you open it in Word then shame on you. Then place your cursor just in front of the <?php and backspace like it’s going out of style. Then save the file and reupload the file.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    awangr: I really wasn’t asking you what the content of wp-config.php was, I was actually telling you what it was.

    Before the <?php, you have something else. It might be a blank line. It might be a space. I don’t know. But it’s there. Your error message tells me so:

    (output started at /home/lensakre/public_html/wp-config.php:1)

    That says that line one of wp-config.php is producing output. There’s one way it can do that.

    If this is a new installation, then perhaps you edited the wp-config.php file with something that is not a text editor. Start with a fresh copy and use a normal text editor. Notepad will do. Word will not.

    Thread Starter awangr

    (@awangr)

    hi otto42, thanks

    i edited it with notepad (even used scriptol-php) trying to remove something in front of the <?php, but it still give me the same error message.

    When you upload the files to your server do you use ftp if so do you also make sure to use ASCII mode instead of binary.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    awangr:
    Redownload a fresh copy of WordPress.
    Make a copy of the wp-config-sample.php file.
    Edit that file using Notepad and put your database parameters in.
    Use this new file.

    Once a file has been badly edited with a bad editor, fixing it is difficult. Starting from scratch is easier.

    Thread Starter awangr

    (@awangr)

    hi all,

    it works now. thanks

    but i am having the cookies problem with this error message :

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

    I’m using Firefox and have enabled cookies.

    that’s a Firefox problem as it’s happened to me. Something to do with the plist file for Firefox I think.

    B

    For what it’s worth, I uploaded the zipped WordPress 2.3 distro and unzipped it on my server, then did my install, and also ran into the same problem awangr did. After reading this thread, I looked at my config file and found two returns at the end of the config file. Removing the two returns solved the problem. (I *also* had the cookies problem, but two forced reloads in both Safari and Firefox after the removal of the returns got around that.)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Warning: Cannot modify header information –’ is closed to new replies.