In a PerlAccessHandler I have code similar to the following:
sub handler
{
my $r = shift;
my ($cgi, $cookie);
use CGI;
$cgi = new CGI;
$cookie = $cgi->cookie(-name => 'test');
# For debugging only
open(TEST, ">>/tmp/accesstest");
flock(TEST,2);
print TEST "cookie = $cookie";
close(test);
# This if block is not included in the PerlHandler version
if ($cookie eq '')
{
return FORBIDDEN;
}
}
However, nothing is written to the log file and the forbidden screen is
displayed. The exact same code works fine if its in a regular mod_perl module
installed using PerlHandler. Why is the code working inside a PerlHandler
module and not in PerlAccessHandler?
The system in question is running Apache 1.3.19+mod_perl 1.25+Perl
5.005_03 (RedHat 6.2).
Thanks,
Alec