Fellow Perl Mongers,

Can anyone help with my latest programming riddle?

I am trying to take advantage of the session-handling features of
Apache::Session.  My program includes the following code (line numbers added
for clarity):

20: # Session handler (I)...
21: use Apache::Session::DBI;

[cut]

40: # Session handler (II)...
41: my %session;
42: tie %session, 'Apache::Session::DBI',
43: {DataSource => "dbi:$db_driver:sessions:$db_address"};
44: my $session_cookie = "session_id=$session{_session_id};";

[cut]

The variables $db_driver and $db_address are imported from a small
configuration file that defines them as "mysql" and "192.168.0.201"
respectively.

My program dies when called (via CGI under mod_perl) with an "500 Internal
Server Error" with the following line appended to error.log:

[Wed Nov 21 22:25:12 2001] [error] PerlRun: `Can't locate object method
"TIEHASH" via package "Apache::Session::DBI" at
e:/apache/htdocs/shapeshifter/system/logon.cgi line 42.'



Platform:  Win2K, Apache, mod_perl, MySQL...

Any suggestions (apart from quit programming and take up farming instead)?

Jonathan M. Hollin - WYPUG Co-ordinator
West Yorkshire Perl User Group
http://wypug.pm.org/

Reply via email to