Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: I am having problems setting a Cookie

by spartacus9 (Beadle)
on Sep 21, 2002 at 23:21 UTC ( [id://199816]=note: print w/replies, xml ) Need Help??


in reply to I am having problems setting a Cookie

While your code looks like it would work (I tested it on my end, altering just the cookie domain), I generally debug my cookie problems by removing everything that is not essential to setting the cookie and one-by-one adding them back in. For example, try setting the cookie without declaring the expiration date, the domain or the path. Just set the name and value. Then test it with Mozilla and afterward use the Cookie Manager in Mozilla to see exactly what was set. Provided that works, then add in the expiration date, then the path, and finally the domain. The most common problem I see with cookie files occurs when messing with the domain attribute. One small mistake and the cookie will never be set because it won't allow you to set a cookie for another domain.

Hope that helps.
  • Comment on Re: I am having problems setting a Cookie

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://199816]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-19 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found