KFredje Posted September 27, 2009 Share Posted September 27, 2009 Hi, I want to load my guestbook in my page but there is something I can't fix myself. If you look on this page: http://www.ludo.creative-j.org/V4/BEindex.php?pagina=gastenboek you see an error: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ludo/domains/ludo.creative-j.org/public_html/V4/BEindex.php:14) in /home/ludo/domains/ludo.creative-j.org/public_html/V4/guestbook/header.php on line 2 I know it's cause <html> is already started at BEindex.php : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <HTML> <HEAD> <TITLE>Windmolentechnologie</TITLE> <LINK HREF="css/BEnav.css" REL="stylesheet" TYPE="text/css" /> <LINK HREF="css/BEcontent.css" REL="stylesheet" TYPE="text/css" /> <!--[if lte IE 7]> <LINK HREF="css/ie7.css" REL="stylesheet" TYPE="text/css" /> <![endif]--> <script type="text/javascript" src="js/klok.js"></script> <?php switch($_GET['pagina']) { case "inhoud": $page="BEinhoud.html";break; case "logboek": $page="BElogboek.html";break; case "profielen": $page="BEprofielen.html";break; case "kalender": $page="BEkalender.html";break; case "gastenboek": $page="guestbook/guestbook.php";break; default: $page="BEhome.html";break; } ?> <?php $myvar=file_get_contents("text.txt"); $myvar2=explode("\n",$myvar); ?> </HEAD> <BODY> <div id="container"> <div id="NavTop"><a href="BEindex.php"><img class="be" src="images/be.gif"></a><a href="FRindex.php"><img class="fr" src="images/fr.gif"></a><a href="ENindex.php"><img class="en" src="images/en.gif"></a></div> <div id="NavTitle"></div> <div id="NavHome"><a href="?pagina=home"><img src="images/transparent.gif" class="transparent"></a></div> <div id="NavInhoud"><a href="?pagina=inhoud"><img src="images/transparent.gif" class="transparent"></a></div> <div id="NavLogboek"><a href="?pagina=logboek"><img src="images/transparent.gif" class="transparent"></a></div> <div id="NavProfielen"><a href="?pagina=profielen"><img src="images/transparent.gif" class="transparent"></a></div> <div id="NavKalender"><a href="?pagina=kalender"><img src="images/transparent.gif" class="transparent"></a></div> <div id="NavGastenboek"><a href="?pagina=gastenboek"><img src="images/transparent.gif" class="transparent"></a></div> <div id="NavBlank"></div> <div id="NavBanner"></div> <div id="midden"> <div id="ContentLeft"> <table id="klok"><tr> <td id="kloktd"> <img src="dg8.gif" name="hr1"><img src="dg8.gif" name="hr2"><img src="dgc.gif" name="c"><img src="dg8.gif" name="mn1"><img src="dg8.gif" name="mn2"><img src="dgc.gif" name="c"><img src="dg8.gif" name="se1"><img src="dg8.gif" name="se2"> </td></tr></table> <div id="nieuws"><?php echo $myvar2[4]; ?></div> </div> <div id="ContentRight"> <?php include $page; ?> </div> <div id="Footer"></div> </div> </div> </BODY> </HTML> and this is header.php of my guestbook which make the error: <?php session_start(); ?> <!-- NOTE: PLEASE DO NOT REMOVE THE BELLOW 3 LINES FROM YOUR HEADER FILE --> <?php include("gbclass.php"); include("config.php"); include("language/$default_language"); ?> <!-- NOTE: PLEASE DO NOT REMOVE THE ABOVE 3 LINES FROM YOUR HEADER FILE --> <html> <head> <title>Powered by DigiOz Guestbook Version 1.7.2</title> <link rel="STYLESHEET" type="text/css" href="style.css"> </head> <body bgcolor="#FFFFFF" text="#000000" link="#8080ff" vlink="#0000ff" alink="#ffff00"><center> <h1><?php echo $headingtitletxt ?></h1> <br><br> <center> [ <a href="guestbook.php"><b><?php echo $addentrytxt ?></b></a> ] [ <a href="list.php?page=1&order=asc"><b><?php echo $viewguestbooktxt ?></b></a> ]<br> [ <a href="list.php?page=1&order=asc"><?php echo $newpostfirsttxt ?></a> ] [ <a href="list.php?page=1&order=desc"><?php echo $newpostlasttxt ?></a> ]</center> <br> <form action="search.php" method=post> <table border=0 cellpadding=2> <tr> <td><font size="1">Enter Search <b>WORD</b>:</font></td> <td align=left><input type="text" name="search_term" size=20 maxlength=50><input type=submit value="Find Now!"></td> </tr> </table> </form> <br> How can i let the header work? Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 weight space, or html before session_start() <?php session_start(); ?> // <<<no space example. <?php session_start ?> // <<< with space example Because your adding a comment plug in ((but not advised using ob_start() but can do here? never relay on ob_start() as session fix. <?php ob_start(); session_start(); //code ob_flush(); ?> Quote Link to comment Share on other sites More sharing options...
KFredje Posted September 27, 2009 Author Share Posted September 27, 2009 tnx for replay but I don't understand it :S I'm thinking of another solution. Is it possible to load a css life without the <head></head> ? Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 You couldn't understand that my god, don't change nonthinking add and see. <?php ob_start(); session_start(); ?> <!-- NOTE: PLEASE DO NOT REMOVE THE BELLOW 3 LINES FROM YOUR HEADER FILE --> <?php include("gbclass.php"); include("config.php"); include("language/$default_language"); ?> <!-- NOTE: PLEASE DO NOT REMOVE THE ABOVE 3 LINES FROM YOUR HEADER FILE --> <html> <head> <title>Powered by DigiOz Guestbook Version 1.7.2</title> <link rel="STYLESHEET" type="text/css" href="style.css"> </head> <body bgcolor="#FFFFFF" text="#000000" link="#8080ff" vlink="#0000ff" alink="#ffff00"><center> <h1><?php echo $headingtitletxt ?></h1> <br><br> <center> [ <a href="guestbook.php"><b><?php echo $addentrytxt ?></b></a> ] [ <a href="list.php?page=1&order=asc"><b><?php echo $viewguestbooktxt ?></b></a> ]<br> [ <a href="list.php?page=1&order=asc"><?php echo $newpostfirsttxt ?></a> ] [ <a href="list.php?page=1&order=desc"><?php echo $newpostlasttxt ?></a> ]</center> <br> <form action="search.php" method=post> <table border=0 cellpadding=2> <tr> <td><font size="1">Enter Search <b>WORD</b>:</font></td> <td align=left><input type="text" name="search_term" size=20 maxlength=50><input type=submit value="Find Now!"></td> </tr> </table> </form> <br> <?php ob_flush(); ?> Quote Link to comment Share on other sites More sharing options...
KFredje Posted September 27, 2009 Author Share Posted September 27, 2009 tnx, but I fixed it another way ^^ but now there's a shity problem in IE8 :S my page don't load there. In FF and IE7 it works perfect. http://www.ludo.creative-j.org/V4/guestbook/guestbook.php Quote Link to comment Share on other sites More sharing options...
mikesta707 Posted September 27, 2009 Share Posted September 27, 2009 all you really needed to do was put session_start at the beginning of your index page. whatever pages are included with a page that has session_start() on the top doesn't need to have session start Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 session_start() must go on all pages mikesta707... what ur saying is why ppl get errors because they must not use session_start (dynamically with includes. every page needs session_start() at the top ((written not added via a included file.... reference response to all you really needed to do was put session_start at the beginning of your index page. whatever pages are included with a page that has session_start() on the top doesn't need to have session start Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 what did you do then post the result we like to learn please.. not csi are u? Quote Link to comment Share on other sites More sharing options...
KFredje Posted September 27, 2009 Author Share Posted September 27, 2009 I just putted my BEindex.php in my header.php of the guestbook. since BEindex.php is modified by another file is it easy to just copy the codes in there. The only problem is now that my page stops working in IE8 Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 sorry but far as what i can tell your using all sorts of 3rd party applications and ie8 not loking something... never had a problem...... validate your hrml http://validator.w3.org/ Quote Link to comment Share on other sites More sharing options...
KFredje Posted September 27, 2009 Author Share Posted September 27, 2009 tnx, but it doesn't look that good -.-" http://validator.w3.org/check?uri=http%3A%2F%2Fwww.ludo.creative-j.org%2FV4%2Fguestbook%2Fguestbook.php&charset=%28detect+automatically%29&doctype=Inline&group=0 Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 4 errors on css amazing lol. you got a post already going please use one only.... http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.ludo.creative-j.org%2FV4%2Fguestbook%2Fguestbook.php&profile=css21&usermedium=all&warning=1&lang=en Quote Link to comment Share on other sites More sharing options...
KFredje Posted September 27, 2009 Author Share Posted September 27, 2009 i know, srry but seems to be fixed in IE by adding this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> one prob now, can't check anymore in IE7 now since I installed IE8 Quote Link to comment Share on other sites More sharing options...
Alex Posted September 27, 2009 Share Posted September 27, 2009 i know, srry but seems to be fixed in IE by adding this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> one prob now, can't check anymore in IE7 now since I installed IE8 You can use this website to see how your website looks in various versions of IE. Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 this it moaning at #ContentiFrame { width : 559px; height : 100%; } Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 where your iframe mate, it going mad...... read this it you again http://www.webdesign.org/web/html-and-css/tutorials/how-to-change-your-iframe-settings-w-css.4798.html what ever setting you have the iframe set to, it effects the validation, correct your iframe here. Quote Link to comment Share on other sites More sharing options...
KFredje Posted September 27, 2009 Author Share Posted September 27, 2009 i'm not even using iframes Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 just added a comment on your messages, but there nothing stopping me adding loads of comments, also there nothing stopping me add spam to this message script, also there nothing cheeking the mx record of the email is correct. improve your code or get thousands of spam every day. ContentiFrame <<< what ever this is pointing at the css is wrong i thort it was a iframe sorry..... Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 also i just got the page, to refresh something i posted 4 times, and it worked, four entry's..... Quote Link to comment Share on other sites More sharing options...
KFredje Posted September 27, 2009 Author Share Posted September 27, 2009 i know, srry but seems to be fixed in IE by adding this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> tnx fixed IE7 guestbook ^^ one prob now, can't check anymore in IE7 now since I installed IE8 You can use this website to see how your website looks in various versions of IE. @redarrow: I'm working on antispam Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.