-1

how can I solve this error?

Warning: Cannot modify header information - headers already sent by (output started at /home/content/33/11887833/html/fixoye/wp-includes/class-wp-roles.php:1) in /home/content/33/11887833/html/fixoye/wp-includes/pluggable.php on line 1228

  • can you post the minimum code that reproduces this error? – ml-moron Mar 22 '16 at 02:59
  • 1
    Possible duplicate of [How to fix "Headers already sent" error in PHP](http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php) – rnevius Mar 22 '16 at 03:33

2 Answers2

0

Since you haven't provide your code, it is difficult to figure out what is the problem exactly & where it is. Here are some of common root problems that leads to these kind of errors.

Usually this error message gets prompts when some output is sent before to your HTTP headers are sent.

Here are some frequent causes to the type of errors

  • If there are white spaces at the beginning or end of files

     <?php
        // Note: There is a space before "<?php"
    ?>
    
  • Printing output before sending the headers

    printing

    • echo
    • printf
    • readfile
    • passthru
    • print
    • vprintf
    • trigger_error
    • ob_flush
    • ob_end_flush
    • var_dump
    • print_r
    • flush
    • imagepng
    • imagejpegcodes

    before sending headers.

    <?php
        echo "something";
        header("Location:index.php");
    ?>
    
  • Sometimes cause can be a warning message outputted by php

    • display_errors php.ini property will silently fixes the error and emits a warning instead of crashing on a programmer mistake. so before the header, that warning may be move first.

NOTE : What you should find out is, where the place that the application outputs an HTTP body before the HTTP header.

There is a nice article about this problem 'PHP development: why redirects don't work (headers already sent)', by Adobe

And also this answer in stackoverflow also points outs many error points How to fix “Headers already sent” error in PHP

Community
  • 1
  • 1
Omal Perera
  • 2,971
  • 3
  • 21
  • 26
0

Fixed it. just replaced the functions.php file of our theme with the original file or backup file.

or

Simply take the wp-config.php file, open it in a text editor and click save as. It will try to save as UTF-8 file, save it as ANSI.

or

fixed this by removing

from your header.php file

Pardeep Pathania
  • 1,378
  • 2
  • 15
  • 23