Advertisement:

Author Topic: Cannot modify header information error  (Read 946 times)

adrianratiu

  • Newbie
  • *
  • Posts: 17
Cannot modify header information error
« on: February 29, 2016, 04:41:09 pm »
Hy i have this problem whit my theme, i upload theme, work great, and when i want to serach i give this error :

Code: [Select]
Warning: Cannot modify header information - headers already sent by (output started at /home/samsung123/public_html/oc-includes/osclass/utils.php:1740) in /home/samsung123/public_html/oc-includes/osclass/utils.php on line 1743
In this files at line 1743 i  have this :

Code: [Select]
function osc_redirect_to($url, $code = null) {
    if(ob_get_length()>0) {
        ob_end_flush();
    }
    if($code!=null) {
        header("Location: ".$url, true, $code);
    } else {
        header("Location: ".$url);
    }
    exit;
}

adrianratiu

  • Newbie
  • *
  • Posts: 17
Re: Cannot modify header information error
« Reply #1 on: February 29, 2016, 06:20:36 pm »
anyone  can help me ?

Aficionado

  • Guest
Re: Cannot modify header information error
« Reply #2 on: February 29, 2016, 06:51:15 pm »
This is usually after editing the code and left some things out or introduce spaces here and there.

and please don't bump the threads.
« Last Edit: February 29, 2016, 07:29:29 pm by Aficionado »

adrianratiu

  • Newbie
  • *
  • Posts: 17
Re: Cannot modify header information error
« Reply #3 on: February 29, 2016, 08:17:46 pm »
so, how i can fix this error ?


Aficionado

  • Guest
Re: Cannot modify header information error
« Reply #4 on: February 29, 2016, 08:37:13 pm »
Activate bender and see for the error. If there is NO error with bender theme, then CORRECT your modifications of your other theme.


Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: Cannot modify header information error
« Reply #5 on: February 29, 2016, 10:10:36 pm »
at first, you should assume that there are no spaces before the <? in the files you've modified... then be sure, that there is no output before your header is send