Re: [PHP] Re: session error ... I think
Alexander Ross wrote: I'm slowly beginning to undrestand this, but please bear with a php novice. When/how were the headers sent? In other words, how do I know that they have already been sent? Because something other than a header has gone out. As something other has gone out, it is not possible to send more headers. Thus headers that were to be sent must have already been sent. I interpret this error message as Something other than headers has already been sent so you cannot send headers now., (but then I have been known to be wrong). HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session error ... I think
ok ... but the line of code that was the culprit was simply: print var id = .$id.br; //for debugging how does that line constitute sending more header info? Alex Chris Hewitt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Alexander Ross wrote: I'm slowly beginning to undrestand this, but please bear with a php novice. When/how were the headers sent? In other words, how do I know that they have already been sent? Because something other than a header has gone out. As something other has gone out, it is not possible to send more headers. Thus headers that were to be sent must have already been sent. I interpret this error message as Something other than headers has already been sent so you cannot send headers now., (but then I have been known to be wrong). HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session error ... I think
When you request a page, for instance, php.net, your web browser sends HTTP headers to the server that holds php.net on it. When the server receives these HTTP headers, it knows which page is needed, and sets up it's own headers to send back to the browser, such as location, file types, etc. It then sends back the requested page with all the appropriate header information to the browser, which displays the page. Where your question comes into play is somewhere in the middle. You can set the HTTP headers only AFTER the request to the server has been made, but has to be BEFORE the page arrives at the client browser for display. So, when we all say that there can be NOTHING output to the HTML file before the headers are sent, we mean it literally. For example: Open up Notepad. Hit return once, then type this in: ?php header(Location: index.php); ? Upload it and run it. You'll get an error. Why? Because you sent a hard return to the HTML output BEFORE the header was sent. Hopefully this is not all jumbled an unhelpful. Heh :o) Good Luck! Martin Chris Hewitt [EMAIL PROTECTED] 07/11/02 01:40PM Alexander Ross wrote: I'm slowly beginning to undrestand this, but please bear with a php novice. When/how were the headers sent? In other words, how do I know that they have already been sent? Because something other than a header has gone out. As something other has gone out, it is not possible to send more headers. Thus headers that were to be sent must have already been sent. I interpret this error message as Something other than headers has already been sent so you cannot send headers now., (but then I have been known to be wrong). HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session error ... I think
Alexander Ross wrote: ok ... but the line of code that was the culprit was simply: print var id = .$id.br; //for debugging how does that line constitute sending more header info? It does not constitute sending more headers, but it does say that no more may be sent (as you have already sent the print line). Headers have to be the first thing sent, before anything else. Once anything else is sent then, by definition, headers are complete. Think of the error message saying Some output has been sent so its too late to send a header now. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php