Osclass forums

Support forums => Themes => Topic started by: adrianratiu on February 29, 2016, 04:41:09 pm

Title: Cannot modify header information error
Post by: adrianratiu 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;
}
Title: Re: Cannot modify header information error
Post by: adrianratiu on February 29, 2016, 06:20:36 pm
anyone  can help me ?
Title: Re: Cannot modify header information error
Post by: Aficionado 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.
Title: Re: Cannot modify header information error
Post by: adrianratiu on February 29, 2016, 08:17:46 pm
so, how i can fix this error ?

Title: Re: Cannot modify header information error
Post by: Aficionado 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.

Title: Re: Cannot modify header information error
Post by: Liath 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