I'm having a problem setting up Apache::Session on
one machine and not another, and I'm hoping that
someone will recognize what I'm doing wrong.

I'm using Mason to make the connection to
the package when Apache starts up. On the problem
server, the following happens on server start-up:

starting httpd...
Ambiguous use of read => resolved to "read" => at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
35.
Ambiguous use of write => resolved to "write" => at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
35.
Ambiguous use of {read} resolved to {"read"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
43.
Ambiguous use of {write} resolved to {"write"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
44.
Ambiguous use of {read} resolved to {"read"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
54.
Ambiguous use of {write} resolved to {"write"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
61.
Ambiguous use of {read} resolved to {"read"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
68.
Ambiguous use of {write} resolved to {"write"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
74.
Ambiguous use of {read} resolved to {"read"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
81.
Ambiguous use of {read} resolved to {"read"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
85.
Ambiguous use of {write} resolved to {"write"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
92.
Ambiguous use of {write} resolved to {"write"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
96.
Ambiguous use of {read} resolved to {"read"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
103.
Ambiguous use of {write} resolved to {"write"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
106.
Ambiguous use of {read} resolved to {"read"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
110.
Ambiguous use of {write} resolved to {"write"} at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
111.


The server does start, however. But when I try to access
a page that uses the session hash, the following appears
in the httpd error log:

[Thu Nov  4 11:17:21 1999] [error] Permission denied at
/usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
64.


I've checked the permissions on the module itself, the
directory where the session files are stored, and the
permissions of the owner of the httpd process. I've
had no problem on another server, also running Linux
2.0.35. All the corresponding PERL modules seem synched,
as well as the Apache httpd binaries.

Here is the script that is called (part of Mason's
start up script called handler.pl):

    # This block of code can be enabled to create a session-hash that
      every
    # component can access.  This is useful for maintaining state
      across
    # multiple requests.  The Apache::Session module is required.
    #
    my %session;
    my $cookie = $r->header_in('Cookie');
    $cookie =~ s/SESSION_ID=(\w*)/$1/;
    tie %session, 'Apache::Session::File', $cookie, {'Directory' =>
      '/tmp/session'};
    $r->header_out("Set-Cookie" =>
      "SESSION_ID=$session{_session_id};") if ( !$cookie );
    
    # This creates a global called %session that is accessible in all
      components.
    # Feel free to rename this as needed.
    #
    local *HTML::Mason::Commands::session = \%session;
    
    $ah->handle_request($r);
    
    untie %HTML::Mason::Commands::session;

This is Apache-Session-1.03 and HTML-Mason-0.72 on
Apache 1.3.6.

Thanks for any help/hints you can provide.

Marc Kelly
[EMAIL PROTECTED]

Reply via email to