Log in

View Full Version : when i upgraded to 2.0.3, this happened


Ruth
08-02-2001, 08:05 AM
in every non vB page that uses a header, i get this
Warning: Oops, php3_SetCookie called after header has been sent in ./admin/functions.php on line 1475

when i try to logout and log in from a different page...

how can i solve this ?

Thanks

Mike Sullivan
08-02-2001, 04:21 PM
Make sure you're not printing anything out before including/requiring global.php.

Ruth
08-03-2001, 12:39 AM
<?php

chdir($DOCUMENT_ROOT . "/forums");
require($DOCUMENT_ROOT ."/forums/global.php");

eval("dooutput(\"".gettemplate('header')."\");");

if ($bbuserinfo['userid']==0) {
eval("standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
}
else
{
$username=$bbuserinfo['username'];

if ($bbuserinfo['value']!='') {
if ($bbuserinfo['value2']!=''){ $variable=$bbuserinfo['value2'];}

}

}

?>


This is the code i am using where i added after requiring global.php
eval("dooutput(\"".gettemplate('header')."\");");

but maybe because the standarderror template, is using another header as well, so the header doubles.

so i decided to remove the header from redirecterror, and i didnt get that much error on line 1475, but you know it is not that good using all the redirecterror templates without a header, so

(1) is there any advice on using this for a better solution?

(2) is it possible to use the header only for the second "if"statement and not when getting the template error_nopermission_loggedout using the previous code?

Thanks Ed for your help :)