Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't fetch cookie from different directory

Status
Not open for further replies.

manjoufna

Programmer
Sep 7, 2001
9
0
0
US
If you set a cookie's path variable to "/", then that should allow perl cgi scripts in another directory (on the same server) fetch it, right?

Does anyone know why I can fetch a cookie from a script in the same directory as where it's set, but not from a script in a different directory?

Here's how I set the cookie:
$icookie = $http->cookie(
-name=>'cookie_id',
-value=>$login_id,
-expires=>'',
-path=>'/'
-domain=>''
-secure=>0
);

The code used to fetch the cookie is from a central sub routine that all the scripts use.

%cookies = CGI::Cookie->fetch;

%cookies has no value if coded in remote scripts.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top