RE: [PHP] Cannot add header information

From: Date: Wed, 01 May 2002 14:04:49 +0000
Subject: RE: [PHP] Cannot add header information
Groups: php.general 
Request: Send a blank email to php-general+get-95520@lists.php.net to get a copy of this message
> -----Original Message----- > From: Bo Pritchard [mailto:bopritchard@mindspring.com] > Sent: 01 May 2002 14:29 > > Warning: Cannot add header information - headers already sent > by (output > started at /home/omnidevi/omnidevices-www/s-cart/form.phtml:5) in > /home/omnidevi/omnidevices-www/s-cart/shop-head.phtml on line 40 > > I posted this error message a few days ago and got very helpful > answers...Unfortunately I can't locate the problem in my code...I was > running this exact same code on another server and it worked > fine. I know > it's a lot to ask but can someone quickly review this 2 files > to figure out > what I'm doing wrong.. Well, I opened form.phtml, and the very first line in it is: <html> This starts the output of the page that the error message is complaining of, so from here on you cannot do *anything* that attempts to output headers -- this includes using cookies or sessions or anything else that relies on headers. It looks to me like you need to do some *serious* re-ordering of your code, given that the offending line is over 250 lines away and inside an include file to boot!! Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#95520) next »