OEMike has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use CGI; use Apache::Session::File; my $query = new CGI; my %session; my $id = undef; $id = $query->cookie(-name=>"SID01"); tie %session, 'Apache::Session::File', $id, { Directory => "../../http-docs/", LockDirectory =>"../../http-docs/"}; if ($id == undef) { $cookie = $query->cookie( -name=>'SID01', -value=>$session{_session_id}, -expires=>'+1y', -path=>'/session'); print $query->header(-cookie=>$cookie); print "Assigned session ID<br>n"; } else { print $query->header(); print "Not assigned session ID<br>n"; }; $id = $session{_session_id}; print "Content-type: text/html\n\n"; print "<html>n"; print " <head><title>Session ID</title></head>n"; print " <body bgcolor=#ffffff>n"; print " Your session ID is $idn"; print " </body>n"; print "</html>n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Apache and Permission Denied
by fuzzyping (Chaplain) on Jul 17, 2002 at 14:34 UTC | |
by OEMike (Novice) on Jul 17, 2002 at 14:41 UTC | |
by fuzzyping (Chaplain) on Jul 17, 2002 at 15:10 UTC |