Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: The cookie crumbles

by Siddartha (Curate)
on Oct 24, 2001 at 15:24 UTC ( [id://121076]=note: print w/replies, xml ) Need Help??


in reply to Re: The cookie crumbles
in thread The cookie crumbles

Thanks for your reply.

I have tested it with Netscape and IE on Pc and Mac, and it doesn't work on any. Netscape says "document contains no data".

By changing to:
my $myuri = $query->self_url();
I still get the same problem. I prefer not to use it, since I only want to pass the one parameter if the cookie was not found.

Any more ideas would be welcomed. I am currently looking at the firewall, but don't see any obvious problems. the domain is exactly the same, there is only one domain name.

--Siddartha

Replies are listed 'Best First'.
Re: Re: Re: The cookie crumbles
by Masem (Monsignor) on Oct 24, 2001 at 15:42 UTC
    There might be a problem between setting a cookie followed by a redirect (I know, there shouldn't be one, but...). Try, instead of printing that redirect for the time being, print a simple page, to see if that part of the loop is even being seen.

    Try to print to either the web page or to the log file the values of $menu and $name, ideally bracketed as in "--$name--", in case that your firewall might be adding extra characters to the end. If anything, try replacing the not-equal comparison with a regex (  if ( $name !~ /$cookie_name/ ) ....

    As for the script referencing, I would suggest that it's always better to let the cgi determine where it is than for you to specify it; that's one less place where a site setting could go amiss if you have to move servers. You can delete all the other CGI params except for name using:

    foreach my $param ( $query->params() ) { $query->delete( $param ) if ( $param ne 'name' ); }
    and then use the self_url to leave only the name param and the right script location. That (probably) won't fix your problem; it's only a style issue.

    -----------------------------------------------------
    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
    "I can see my house from here!"
    It's not what you know, but knowing how to find it if you don't know that's important

      Thanks a lot!

      I got it working. I was printing everythig and couldn't find any problems. Then I printed the redirect request as well and saw that with all the maintenance the server suddenly thought it was 1970 instead of 2001. This is why all the cookies were being dropped.

      Once again thanks for all your suggestions.

      --Siddartha

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-03-28 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found