| 
	
 | 
 Posted by Gordon Burditt on 06/25/06 04:07 
>> >> >But as I said earlier in the thread, PHP is giving me bum messages that 
>> >> >offer no illumination. 
>> >> 
>> >> They are telling you where the problem is.  White space is a common, 
>> >> and difficult to find, but not the only cause of headers being sent. 
>> > 
>> >I think you are right, they are telling me where the problem is. I now 
>> >suspect the error was being triggered when this class method (which 
>> >sends a charset header) was called: 
>> 
>> The combination of header(), which sends a header, 
>> and ob_end_flush(), which forces the output, means you can't 
>> call session_start() after this function gets called. 
> 
>Thanks much. I think you found the problem. My understanding of headers 
>is shamefully weak. if I wanted to read up on how the headers work, 
>would I read up on the http protocol or the IP protocol?  
 
HTTP.  It's quite simple:  a HTTP request consists of a request 
(typically GET or POST), followed by headers (if any), followed by 
a blank line, followed by a body (if any).  A HTTP reply consists of 
a response line, followed by headers (if any), followed by a blank 
line, followed by a body (if any).  You don't get to change the 
order.  If you've already sent the blank line, it's too late to 
send more headers. 
 
>I'm afraid 
>right now I'm not even sure what category of information it is that I'm 
>lacking. 
 
						Gordon L. Burditt
 
  
Navigation:
[Reply to this message] 
 |