|Do you know where your variables are?|
Cookies, mod_perl and apache request handlersby reasonablekeith (Deacon)
|on Sep 25, 2007 at 09:32 UTC||Need Help??|
reasonablekeith has asked for the wisdom of the Perl Monks concerning the following question:
Monks, I'm banging my head against the wall here. I just can't seem to set a cookie.
I'm using the following set up.
Within the httpd conf I've defined the following, to pick up any dynamic requests...
I've got my own handler here because I'm picking up the the uri, and using it to run template toolkit against an appropriate file. This goes something like this (a bit cut down)...
... with $nav being a pre-created object which looks after which uri's compile which templates (although, all this works nicely, so only provided here for context).
I've tried all sorts of things within this sub, but have settled on showing the simplest example of what, as far as I can understand, should work, but doesn't. Namely, it's that "headers_out" line. It doesn't set a cookie in my browser. I've set my browser to prompt me on and new cookie request, which is popping up new windows all the time, except when I visit my site. Any ideas where I'm going wrong anyone?
All help gratefully received. Thanks, Rob
my name's not Keith, and I'm not reasonable.