Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am just learning to use mod_perl. I recently installed the Apache::Session package. I am trying to use the code listed below, but I get an error saying TIEHASH object method not found in Apache::Session::MySQL

use strict; use Apache::Session::MySQL; tie (%session, 'Apache::Session::MySQL', undef);

I am running ActiveState Perl 5.6.1 on Windows 2000. Thanks for answers in advance.

Replies are listed 'Best First'.
Re: Apache::Session error
by lachoy (Parson) on May 14, 2002 at 04:17 UTC

    You might not have Apache::Session installed. When I run your sample code I get:

    Can't connect( HASH(0x8202dd4)), no database driver specified and DBI_DSN env var not set at /usr/local/lib/perl5/site_perl/5.6.1/Apache/Session/Lock/MySQL.pm line 36

    Check to see if you have the module installed by running from the command line:

    perl -MApache::Session -e "print Apache::Session->VERSION"

    On my machine, I get '1.54' displayed.

    Chris
    M-x auto-bs-mode