FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Code to create a cookie in PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Code to create a cookie in PHP [message #169839 is a reply to message #169832] Tue, 28 September 2010 00:38 Go to previous message
MikeB is currently offline  MikeB
Messages: 65
Registered: September 2010
Karma:
Member
Jerry Stuckle wrote:
> On 9/27/2010 4:56 PM, MikeB wrote:

>> Well, this is puzzling. Both the setcookie commands work. I have
>> verified that both the cookies are created with the firebug/firecookie
>> extensions in Firefox as well with a little program I've written that
>> just dumps out the $_COOKIE variable.
>>
>>
>
> Then you are buffering your output, which can be good on a production
> system (but is not always). You shouldn't be buffering on a development
> system, however, - it hides errors such as this (which have a habit of
> showing up at the worst possible time).
>
> I suggest you comment out the output_buffering (or set it to off) in
> your development system.
>

Whaddaya know....

; Turning on this setting and managing its maximum buffer size can yield
some
; interesting side-effects depending on your application and web server.
; You may be able to send headers and cookies after you've already sent
output
; through print or echo.
output_buffering = 4096

Who'd a thunk it...

Thanks, I'll check it out ....


That was why I was writing the two different cookie statements, I was
expecting one to fail, just wasn't sure.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mysql_fetch_array
Next Topic: Route/Link to an action works with http, but NOT with httpS (SSL!)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Oct 20 05:33:14 GMT 2024

Total time taken to generate the page: 0.03891 seconds