Re: help with php.ini and headers...

From: Date: Sat, 06 Jan 2001 18:42:23 +0000
Subject: Re: help with php.ini and headers...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33041@lists.php.net to get a copy of this message
On Sat, 6 Jan 2001, Alex Behrens wrote: > Hey Guys, > > I'm in the process of making a script and it involves cookies for a login script. When I > submit the query and it comes up on the next page it logins properly but gives me this error: > > > Warning: Oops, php3_SetCookie called after header has been sent in > > How can I disable this in the config for php? I need it so you can pass headers anywhere, not > at the first line. In PHP3 SetCookie does not have to be the first line in your PHP code, however it does have to be sent before any content (Anything tha is not a header) gets sent. The opening <?php tag must start on the very first line with no space before it. If you need to send content before you call SetCookie, you will want to look at Output Buffering, which is availible in PHP4. See http://www.php.net/manual/ref.outcontrol.php for more details. Steve Smith <steve@sws-ic.com> SWS Internet Consulting - 613-792-4944 ICQ: 6083016 Hi! I'm a .signature virus! Copy me into yours and join the fun!

« previous php.general (#33041) next »