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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookie Problem?

Status
Not open for further replies.

Haunter

Programmer
Jan 2, 2001
379
US
I am using cgi.pm to set a cookie in this fashion.

%info=(memdir=>"$usrdat{'userdir'}",
status=>"$usrdat{'status'}",
location=>"$User",
User=>"$usrdat{'user'}",
memurl=>"$usrdat{'memurl'}",
admincomment=>"$usrdat{'admincomment'}",
pack=>"$usrdat{'pack'}" ,
nic=>"$usrdat{'nic'}" );
$cookie = $query->cookie(-name=>'somecookie',
-value=>\%info,
-path=>'/',
);
#print $query->header();<----line 154
print $query->header(-cookie=>$cookie);


I have no problem with this part. The cookie seems to be in the correct format when I uncomment line 154. I am reading the cookie in this fashion.
use CGI;
$database = new CGI;
%info = $database->cookie('somecookie');
#print $database->header();
# while (($key, $value) = each %info){
#print &quot;$key => \&quot;$value\&quot;<BR> , \n&quot;;}
#print &quot;PERL VERSION: $]<BR>&quot; ;

I have no problem getting the cookie on a NT server running IIS but on a *nix server running Apache I am not retreiving the cookie? I am not sure why this seems to be such a simple procedure but it still does not work on *nix.

HELP PLZ, (frustrated)

Thanks in advance....Haunter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top