Re: Solution to "headers already sent" error.

From: Date: Wed, 20 Jun 2001 09:09:48 +0000
Subject: Re: Solution to "headers already sent" error.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-54488@lists.php.net to get a copy of this message
Hy there 8) This one is easy... The thing IS that when you use the header statement there is absolutly NO OUTPUt like echo(); inside the PHP-brackets allowed AND NO OUTPUT allowed outside the PHP-Brackets, before the first header statement appears! Not even simple linebreaks or anything! So watch out for any linebreaks or tabs or spaces outside the php-brackets before the first header statment or any echo or print inside php-brackets before the first header-statement. regards, Jens on 19.06.2001 0:28 Uhr, Merio, Quinn at Quinn.Merio@ideamachine.com wrote: > So, during the time the lists were down, i was banging my head over a > seemingly impossible error message. > > This was the error message: > > Warning: Cannot send session cache limiter - headers already sent > > What?! I exlaimed.. the first line in my page registered the session > variable i was using, so what was the deal. I turned out to be one measly > little space in front of my <?php tag. > > If you are registering a session variable, it seems you cant have ANY > whitespace in the page before you register the session variable. > > Figured i would share that nugget, cus man did it ever drive me nuts, and i > saw no reference to it at all in the manuals. > > Quinn Merio > Vice President > Vir2lAlliance Inc. > www.vr2a.com >

« previous php.general (#54488) next »