WordPress.org

Ready to get started?Download WordPress

Forums

Cannot modify header information - headers already sent by... (18 posts)

  1. phi-nom
    Member
    Posted 7 years ago #

    this is killing me! i get this crazy error on top of my pages and can't get rid of it! i've already tried deleting the whitespace in front and behind the <?Php?> tags. please help me cause this is driving me nuts! i've been able to install the previous versions w/ no problem. here's my error:

    Strict Standards: Assigning the return value of new by reference is deprecated in D:\Apache2_2\htdocs\wordpress\wp-settings.php on line 232

    Strict Standards: Assigning the return value of new by reference is deprecated in D:\Apache2_2\htdocs\wordpress\wp-settings.php on line 234

    Strict Standards: Assigning the return value of new by reference is deprecated in D:\Apache2_2\htdocs\wordpress\wp-settings.php on line 235

    Strict Standards: Assigning the return value of new by reference is deprecated in D:\Apache2_2\htdocs\wordpress\wp-settings.php on line 252

    Warning: Cannot modify header information - headers already sent by (output started at D:\Apache2_2\htdocs\wordpress\wp-settings.php:232) in D:\Apache2_2\htdocs\wordpress\wp-admin\install.php on line 15

  2. Chris_K
    Member
    Posted 7 years ago #

    Assigning the return value of new by reference is deprecated

    What version of WordPress are you running?

    What's at D:Apache2_2htdocswordpresswp-settings.php on line 232?

  3. pizdin_dim
    Member
    Posted 7 years ago #

    Looks like you've got yourself a few extra lines of code in the "wp-settings.php" file. Going by the line number, it's probably a modified version of some V2.XX release?

  4. phi-nom
    Member
    Posted 7 years ago #

    i don't see how it could be modified too much. i downloaded it from wordpress. its v2.1.

  5. phi-nom
    Member
    Posted 7 years ago #

    line 232:

    $wp_the_query =& new WP_Query();

  6. krychek
    Member
    Posted 7 years ago #

    I have the same problem. phi-nom, did you solved this?

    Tnx.

  7. krychek
    Member
    Posted 7 years ago #

    lol. i just managed to kill those annoying messages..

    You should go to your php.ini and remove E_STRICT from your php error_reporting. Ofcourse, if you have acces to this data on your server.

    If you don't, call your hosting provider :)

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    What version of PHP are you running?

  9. phi-nom
    Member
    Posted 7 years ago #

    i tried removing E_STRICT. still doesn't help. bummer. i'm running php 5.2.0.

  10. carsong
    Member
    Posted 7 years ago #

    i tried removing E_STRICT. still doesn't help. bummer. i'm running php 5.2.0.

    1. Create a file called phpinfo.php with the following in it.
      • <?php phpinfo();

      That will tell you the location of the server's php initialization file. It'll look like this:

      • Windows - Configuration File (php.ini) Path C:\WINDOWS\php.ini
      • Unix - Configuration File (php.ini) Path /home/users/mruser/php/php.ini
    2. If you're sure that you're changing the right php.ini file then put the following at the very end of your php.ini file:
      • display_errors = Off
    3. If that doesn't work...(i.e. you can't edit the php.ini file), most webservers let you put your own php.ini You'll probably have to talk to support to figure it out.
  11. thelazygeisha
    Member
    Posted 7 years ago #

    I'm also having a similar issue and getting the same kind of error messages, and it seems to have happened after upgrading from 2.1 to 2.1.1

    I've inspected the relevant files in wp-includes, and there doesn't seem to be any extra whitespace around the opening and closing tags. I'm wondering what else changed between v2.1 and 2.1.1 to cause this.

  12. neogarfield
    Member
    Posted 7 years ago #

    Do you have a plugin named Subscribe2Comments?

    I had this plugin, and it was unsuitable with WP 2.1. I just deactivated the plugin, and now I dont get this error anymore.

  13. wwits13
    Member
    Posted 7 years ago #

    I am also getting this issue

    Warning: Cannot modify header information - headers already sent by (output started at D:\Program Files\xampp\htdocs\wwitsblog\wp-login.php:1) in D:\Program Files\xampp\htdocs\wwitsblog\wp-includes\pluggable.php on
    line 275

    Trying to set a theme development rig running on Xampp (php mysql) and Vista. Tested with IE7, Opera and Firefox. I'm not running iis. Nothing but problems with this setup so far. Joomla, phpbb and gallery are running sweet on this set up. So why the problems?

    Lots like there's an issue with following and various header issues.

    Line 275

    if ( !function_exists('wp_redirect') ) :
    function wp_redirect($location, $status = 302) {
    global $is_IIS;

    $location = apply_filters('wp_redirect', $location, $status);

    if ( !$location ) // allows the wp_redirect filter to cancel a redirect
    return false;

    $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location);
    $location = wp_kses_no_null($location);

    $strip = array('%0d', '%0a');
    $location = str_replace($strip, '', $location);

    if ( $is_IIS ) {
    header("Refresh: 0;url=$location");
    } else {
    if ( php_sapi_name() != 'cgi-fcgi' )
    status_header($status); // This causes problems on IIS and some FastCGI setups
    header("Location: $location");
    }
    }
    endif;

    By the way WordPress runs sweet on the live server (host).Has any one found a solution to this yet.

  14. dyknight
    Member
    Posted 7 years ago #

    I had this issue, but it has been resolved.

    First, I disabled all plugins and activated them one by one. After activating each one, I refreshed the pages that gave me the error(s). It wasn't long before I narrowed down on the problematic one and disabled it. The incompatible plugin happened to be Hello Dolly.

  15. beyondsc
    Member
    Posted 6 years ago #

    I found the trouble:

    first, take the space between define & ( -- define ('WPLANG', '');--
    then, take the / away from the coments:

    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to 'de'

    that's it :)

  16. tfirma
    Member
    Posted 6 years ago #

    My ISP recently upgraded to WP 2.3.1 and then this error cropped up.

    I disabled Google Sitemaps plugin and the errors went away.

  17. polygeek
    Member
    Posted 6 years ago #

    It was Google Sitemaps that caused this error for me. Disabling the plugin fixed everything.

  18. rsims
    Member
    Posted 6 years ago #

    I had a similar "Cannot modify header information - headers already sent" error message that pointed to wp-includes/pluggable.php

    What finally corrected the problem was to roll-back my wp-config file to a version saved prior to upgrading to 2.1

    Go figure.

Topic Closed

This topic has been closed to new replies.

About this Topic