Wordpress Warning: Cannot modify header information...

Discussion in 'HTML & Website Design' started by ademmeda, Feb 20, 2010.

  1. #1
    Hi,

    I am trying to install Wordpress in my language, Turkish. I uploaded all the files, created the database and when I check
    http://www.thewebsite.com/wp-admin/install.php 
    Code (markup):
    it gives the following warning message.

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/thewebsite.com/wp-config.php:1) in /home/xxx/public_html/thewebsite.com/wp-admin/install.php on line 36
    Code (markup):


    I searched the net and did what some people suggested but it did not solve my problem. I know the problem is in wp-config.php file line 1, but can't see what it is.

    The file is below:

    <?php
    /** 
     * The base configurations of the WordPress.
     *
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
     * visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     *
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     *
     * @package WordPress
     */
    
    // ** MySQL ayarları - Bu bilgileri sunucunuzdan alabilirsiniz ** //
    /** WordPress için kullanılacak veritabanının adı */
    define('DB_NAME', 'xxx');
    
    /** MySQL veritabanı kullanıcısı */
    define('DB_USER', 'xxx');
    
    /** MySQL veritabanı parolası */
    define('DB_PASSWORD', 'xxx');
    
    /** MySQL sunucusu */
    define('DB_HOST', 'localhost');
    
    /** Yaratılacak tablolar için veritabanı karakter seti. */
    define('DB_CHARSET', 'utf8');
    
    /** Veritabanı karşılaştırma tipi. Herhangi bir şüpheniz varsa bu değeri değiştirmeyin. */
    define('DB_COLLATE', '');
    
    /**#@+
     * Eşsiz doğrulama anahtarları.
     *
     * Her anahtar farklı bir karakter kümesi olmalı!
     * {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service} servisini kullanarak yaratabilirsiniz.
     * Çerezleri geçersiz kılmak için istediğiniz zaman bu değerleri değiştirebilirsiniz. Bu tüm kullanıcıların tekrar giriş yapmasını gerektirecektir.
     *
     * @since 2.6.0
     */
    define('AUTH_KEY', 'xxx');
    define('SECURE_AUTH_KEY', 'xxx');
    define('LOGGED_IN_KEY', 'xxx');
    define('NONCE_KEY', 'xxx');
    /**#@-*/
    
    /**
     * WordPress veritabanı tablo ön eki.
     *
     * Tüm kurulumlara ayrı bir önek vererek bir veritabanına birden fazla kurulum yapabilirsiniz.
     * Sadece rakamlar, harfler ve alt çizgi lütfen.
     */
    $table_prefix  = 'wp_';
    
    /**
     * WordPress yerel dil dosyası, varsayılan ingilizce.
     *
     * Bu değeri değiştirmenize gerek yok! Zaten Türkçe'ye ayarlı.
     * tr_TR.mo Türkçe dil dosyasının wp-content/languages dizini altında olduğundan emin olun.
     * Türkçe çeviri hakkında öneri ve eleştirilerinizi iletisim@wordpress-tr.com adresine iletebilirsiniz.
     *
     */
    define ('WPLANG', 'tr_TR');
    
    /* Hepsi bu kadar. Mutlu bloglamalar! */
    
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
    Code (markup):
    Can somebody please help?
     
    ademmeda, Feb 20, 2010 IP
  2. Oranges

    Oranges Active Member

    Messages:
    2,610
    Likes Received:
    92
    Best Answers:
    0
    Trophy Points:
    90
    #2
    Download fresh bunch of files from wordpress.org and install with them.
    looks like config.php file having some error, Not sure though! Give it a try.
     
    Oranges, Feb 20, 2010 IP
  3. ademmeda

    ademmeda Active Member

    Messages:
    354
    Likes Received:
    3
    Best Answers:
    3
    Trophy Points:
    70
    #3
    Already tried it, didn't work.
     
    ademmeda, Feb 20, 2010 IP
  4. broxen

    broxen Peon

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    try installing Wp on English version, and add your language to wp-content/languages/.
     
    broxen, Feb 20, 2010 IP
  5. Sbhedges

    Sbhedges Peon

    Messages:
    57
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    rename config.php file to something else and see if that works.
     
    Sbhedges, Feb 21, 2010 IP
  6. bazyv2

    bazyv2 Active Member

    Messages:
    197
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    63
    #6
    check for white spaces before <?php or after ?> in wp-config.php and install.php
     
    bazyv2, Feb 21, 2010 IP
  7. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #7
    Are you trying to reinstall?

    wp-config.php file is generated on completion of the installation process so I assume you have already tried to perform that task once. What you can do is completely remove wp-config.php file from the server and make sure there is a wp-config-sample.php file there instead. Also check the database and drop any WP related tables (prefixed with wp_ unless you've chosed a different table prefix) that might have been created during an incomplete install attempt.

    Then restart the installation process and it should work fine.

    Note: I also see your wp-config.php file is missing the closing php tag (?>). Add it there before doing anything else, just in case it makes a difference. Older PHP versions may have a problem with that as well.
     
    Clive, Feb 21, 2010 IP
  8. ademmeda

    ademmeda Active Member

    Messages:
    354
    Likes Received:
    3
    Best Answers:
    3
    Trophy Points:
    70
    #8
    Ok, the problem is solved when I opened the wp-config.php file within cpanel edit screen and deleted the empty spaces before <?php on the first row, that was not visible or deletable with notepad as I tried it before.
     
    ademmeda, Mar 17, 2010 IP
  9. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #9
    Good to hear that, ademedia. Try to avoid editing files through the wp-admin console in the future, always do that on your local computer and then upload to the live server. There's a good reason behind this method.
     
    Clive, Mar 17, 2010 IP