tecmeister Posted August 21, 2009 Share Posted August 21, 2009 Hi Everyone, I have read the header info on the forum and I don't seem to be able to figure out what is wrong. I've checked for white spacing and there doesn't seem to be any. It is tell me that the header problem is within style sheet. Warning: Cannot modify header information - headers already sent by (output started at /home/nurevol1/public_html/include/top.php: in /home/nurevol1/public_html/include/check_register.php on line 53 Main Page: <?php require_once("include/top.php"); require_once("include/header.php"); require_once("include/tab.php"); require_once("include/sideBar.php"); require_once("include/indexMain.php"); require_once("include/footer.php") ?> include Top: <html> <head> <title>Aerial Fusion | Parkour | Free Running</title> <link href="Images/tag.ico" rel="shortcut icon" /> <link href="Stylesheet/main.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/tab.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/news.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/latestNews.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/about.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/signIn.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/register.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/title.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="description" content="Aerial Fusion are a deadicated Parkour/Free Running team"> <meta name="keywords" content="Aerial Fusion,Parkour,Free Running, cong, kong, gainer, jump, team, extreme, spin, home, gaps, walls, pro, video, nuperspektiv, parkour generation, johnny mccaffery, equipment, sponsors, exercise, dash, flip, David Belle, Parkour Generation, cat, lisses, dame du lac, area, training, traceurs"> </head> <body> <table align="center" cellpadding="0" cellspacing="0" id="all"> <td> latestNews style sheet: #latestNews { float: left; font-family: Verdana, Arial, Helvetica, sans-serif; width: 148px; height: 119px; float: inherit; } #latestNews dt a { text-align: left; padding-left: 25px; width: 125px; float: left; cursor: pointer; line-height: 25px; color: #333; text-decoration: none; display: block; height: 30px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; border-bottom: 1px #ccc solid; outline: none; } #latestNews dt a:hover { background-color: #D9E8FF; } #latestNews dt a:focus { color: #006cff; background-image: url(../Images/title.png); background-position: left; background-repeat: no-repeat; border: none; } Thanks for your help, tecmeister. Link to comment https://forums.phpfreaks.com/topic/171269-header-problem/ Share on other sites More sharing options...
Miko Posted August 21, 2009 Share Posted August 21, 2009 put a ob_start() on top of your header.php and a ob_flush() on the bottom of the footer.php This should do the job. Link to comment https://forums.phpfreaks.com/topic/171269-header-problem/#findComment-903133 Share on other sites More sharing options...
newbtophp Posted August 21, 2009 Share Posted August 21, 2009 That error can possibly be because you have added the head tags on the file aswell as an included file, theirfore its intefering. Read here: http://www.phpfreaks.com/forums/index.php/topic,37442.0.html Link to comment https://forums.phpfreaks.com/topic/171269-header-problem/#findComment-903134 Share on other sites More sharing options...
tecmeister Posted August 21, 2009 Author Share Posted August 21, 2009 put a ob_start() on top of your header.php and a ob_flush() on the bottom of the footer.php This should do the job. Yes that worked. How doe that make it work? Thanks a lot for your help. tecmeister. Link to comment https://forums.phpfreaks.com/topic/171269-header-problem/#findComment-903137 Share on other sites More sharing options...
Daniel0 Posted August 21, 2009 Share Posted August 21, 2009 It works because it turns output buffering on, so it doesn't output anything until you flush the buffer. It's not a "real" fix though, but rather a band aid. You should redesign your application instead. Headers are always the top of an HTTP response, so you cannot first output something and then send additional headers. See the HTTP 1.1 RFC for more info about that. Link to comment https://forums.phpfreaks.com/topic/171269-header-problem/#findComment-903140 Share on other sites More sharing options...
tecmeister Posted August 25, 2009 Author Share Posted August 25, 2009 I have put ob_start(); and ob_flush();. It worked for a bit, but I have got the header problem again. I tried creating a class and putting it at the being of the page. But I'm still getting the same header problem. I have tried removing the latestNews.css link. But it seems to be a problems with line 13 what ever I delete. <?php session_start(); require_once("include/class.php"); $database->dbConnect(); ?> <html> <head> <title>Aerial Fusion | Parkour | Free Running</title> <link href="Images/tag.ico" rel="shortcut icon" /> <link href="Stylesheet/main.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/tab.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/news.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/latestNews.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/about.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/signIn.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/register.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <link href="Stylesheet/title.css" rel="stylesheet" rev="stylesheet" type="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="description" content="Aerial Fusion are a deadicated Parkour/Free Running team"> <meta name="keywords" content="Aerial Fusion,Parkour,Free Running, cong, kong, gainer, jump, team, extreme, spin, home, gaps, walls, pro, video, nuperspektiv, parkour generation, johnny mccaffery, equipment, sponsors, exercise, dash, flip, David Belle, Parkour Generation, cat, lisses, dame du lac, area, training, traceurs"> </head> <body> <table align="center" cellpadding="0" cellspacing="0" id="all"> <td> Thanks, tecmeister. Link to comment https://forums.phpfreaks.com/topic/171269-header-problem/#findComment-906202 Share on other sites More sharing options...
PFMaBiSmAd Posted August 25, 2009 Share Posted August 25, 2009 Post and/or read the current error message. It states where the output is occurring that is preventing the headers from working. Link to comment https://forums.phpfreaks.com/topic/171269-header-problem/#findComment-906213 Share on other sites More sharing options...
tecmeister Posted August 26, 2009 Author Share Posted August 26, 2009 Hi, I entered error_reporting(-1) at the top of the page and found a few errors. But I seem to be still getting the same header error on one of my pages referring to line 8 'lastestNews.css'. The information is above. Thanks, tecmeister. Link to comment https://forums.phpfreaks.com/topic/171269-header-problem/#findComment-906555 Share on other sites More sharing options...
PFMaBiSmAd Posted August 26, 2009 Share Posted August 26, 2009 seem to be still getting the same header error on one of my pages It's not the same header error because both where the output is occurring and where and what is sending a header has changed. Cannot really help you with your current problem without seeing both the actual error message and the relevant code - where the output is occurring, where the header is and any main code that is including any of those files. If you are referring to the code in reply #5, there is nothing in the posted code that would cause a header error having anything to do with lastestNews.css and the line 13 you mentioned in that post is likely in one of the other files not in the file you posted, which is why you need to post the actual error message and indicate the names of the files that you do post. xxxxxx out any sensitive information in the error message but if you expect someone else to help, you must post accurate and relevant information about each problem. Link to comment https://forums.phpfreaks.com/topic/171269-header-problem/#findComment-906698 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.