WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Cannot modify header - premium theme issue (18 posts)

  1. emaarkhan
    Member
    Posted 2 years ago #

    Hi,
    I bought a premium theme and whenever i turn it on and click any new page or post or log back in i am faced with blank page. i looked into error_log and it says

    PHP Warning: Cannot modify header information - headers already sent by (output started at /home2/theartsr/public_html/wp-content/themes/unspoken/core/theme_options.php:1) in /home2/theartsr/public_html/wp-content/themes/unspoken/functions.php on line 19

    i tried to disable all plugins but nothing happens. can anyone help

  2. luckdragon
    Member
    Posted 2 years ago #

    it looks like there is a blank line before the first line of theme_options.php <? just remove the blank line

  3. emaarkhan
    Member
    Posted 2 years ago #

    i saw the file theme_option but it doesn't have space before but after like
    <?php

    // Admin styles & scripts

    I don't think it will do anything. but i tried removing it. but it wouldn't work

    Edit: the line 19 on functions is
    if (!isset($_COOKIE['mode'])) setcookie('mode', ( get_option('unspoken_view_type') == '0' ) ? 'list' : 'grid', time() + 60 * 60 * 24 * 30, COOKIEPATH, COOKIE_DOMAIN, false);
    Also i have noticed that everytime i do /wp-login , it ask me for my password.instead shouldn't it be remembering my login until the cookie times expire?

  4. These forums are for either WordPress core or free themes; for premium themes, go to the developer's website for support and/or a new download.

    "headers already sent" errors seldom refer to relevant lines of code; the issue can be most anywhere.

  5. emaarkhan
    Member
    Posted 2 years ago #

    songdogtech i know premium themes have dedicated forums but i don't have a registration plus they aren't as fast as WP. i was hoping to get answers from here.which might help

  6. emaarkhan
    Member
    Posted 2 years ago #

    I tried installing theme on my local site and it worked but not on server site.

  7. luckdragon
    Member
    Posted 2 years ago #

    it says: headers already sent by (output started at /home2/theartsr/public_html/wp-content/themes/unspoken/core/theme_options.php:1)

    which tells me that line 1 of that file has something on it, since that's where it's saying that the headers were started.

  8. emaarkhan
    Member
    Posted 2 years ago #

    so meaning there is a space before <?php and which files should i watching out for?

  9. luckdragon
    Member
    Posted 2 years ago #

    it tells you:

    /home2/theartsr/public_html/wp-content/themes/unspoken/core/theme_options.php

  10. emaarkhan
    Member
    Posted 2 years ago #

    yes saw that one the line starts with <?php without any blank spaces.

  11. emaarkhan
    Member
    Posted 2 years ago #

    besides, if there was a problem of theme. it wouldn't work on my local machine but on server its not.

    [ Please do not bump, it's not permitted here. ]

  12. @emaarkhan said

    but i don't have a registration....

    What does that mean?

  13. emaarkhan
    Member
    Posted 2 years ago #

    Well i tried there forums but no success. so i m guessing its not theme fault. something to do with WP because on my localhost its working but on live site. it doesn't when activated.

  14. emaarkhan
    Member
    Posted 2 years ago #

    Can be the version number be a issue? i checked on the server its running php 5.2.17 and on local i m running 5.3.8.

  15. See http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    Recreate your wp-config.php file from wp-config-sample.php` (make a copy first).

  16. emaarkhan
    Member
    Posted 2 years ago #

    Wouldn't it overwrite my database even if i give the same DB name? and everything in it.

  17. Nope, wp-config.php is just a configuration file. All of your data will be intact in the database.

    You want to make a backup as a just in case. There is probably a white space or blank line there in that file.

  18. emaarkhan
    Member
    Posted 2 years ago #

    Nope, that didn't help. so i tried that theme on another server and its BlueHost problem because they of their PHP version. Thanks for the help all of you.

Topic Closed

This topic has been closed to new replies.

About this Topic