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.
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.