The manual says...

   Remember that the header() function must be called before any actual
output
   is sent, either by normal HTML tags blank lines in a file, or from PHP.
It is a
   very common error to read code with include(), or require(), functions,
or another
   file access function, and have spaces or empty lines that will output
before
   header() is called. The same problem exists when using a single PHP/HTML
file.

So, an example of what it's complaining about below leads me to
believe that you've already written some ouput to the browser which
effectively ends any possibility to do any HTTP HEADERS.

My guess is that something like this is happening....

<html>
<head><title>title of page</title></head>
<body>
<?php
   header("header-value-and-arguments");
?>
More HTML stuff here
</body>
</html>

... Whereas the following would be what  is acceptable ...


<?php
   header("header-value-and-arguments");
?>
<html>
<head><title>title of page</title></head>
<body>
More HTML stuff here
</body>
</html>


--
    __           _                                Tyler Nally
   / /__  ____ _(_)___  ____   ____  _________ _  [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
  / / _ \/ __ `/ / __ \/ __ \ / __ \/ ___/ __ `/  317-860-3016
 / /  __/ /_/ / / /_/ / / / // /_/ / /  / /_/ /   American Legion Website
/_/\___/\__, /_/\____/_/ /_(_)____/_/   \__, /    http://www.legion.org
<http://www.legion.org> 
       /____/                          /____/   


 

 




> -----Original Message-----
> From: Dobromir Velev [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
> Sent: Thursday, October 18, 2001 3:50 AM
> To: TJayBelt; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Sessions and Frames
>
>
> Hi,
> Every different page in a framset is loaded separatly so the
> only thing you
> should be aware of is not to output anything before the session stuff.
> Also you can use the output control functions lie ob_start -
> check the PHP
> manual for more info.
>
> HTH
> Dobromir Velev
>
> -----Original Message-----
> From: TJayBelt <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Thursday, October 18, 2001 8:28 AM
> Subject: [PHP-DB] Sessions and Frames
>
>
> >I have a site that is successfully using sessions and authentication.
> >However, I am working on another site, and it uses Frames. 
> The first site
> >does not use frames, so including the unit that has the
> session stuff first
> >works.  But on the frames site, it gives the following error  :
> >
> >  'Cannot add header information - headers already sent by '
> >
> >I know that this is when something is trying to print before
> the session is
> >started.
> >
> >I just don't know how to accomplish this if the page I am
> loading is inside
> >a frame... so by the time the session stuff starts, html is
> already output
> >to the browser.
> >
> >thanks for any help you can give.
> >
> >
> >
> >--
> >PHP Database Mailing List ( http://www.php.net/ <http://www.php.net/> )
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP Database Mailing List ( http://www.php.net/ <http://www.php.net/> )
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to