Jump to content

header Problem


tecmeister

Recommended Posts

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:8) 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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.