Geoffrey Gallaway wrote:
> 
> I've been trying to get BerkeleyDB and mod_perl to work together for a
> web database. I'm using BerkeleyDB version 3.1.14 on a RedHat 6.1 based
> system with a stock kernel under apache 1.3.12 and mod_perl 1.21. I wrote
> a simple script to open a berkeley database, read all variables then write
> one.. When running under mod_perl I get the following error from apache:
> 
> [Sun Jun 25 20:38:28 2000] [error] Can't locate object method "TIEHASH"
> via package "BerkeleyDB::Hash" at /home/httpd/cgi-bin/dbtest.pl line 9.

Did BerkeleyDB pass all tests?  Are you certain your perl doesn't have a
different libdb linked in?  (Use ldd on it to find out.)  RedHat comes
with an older libdb installed, so it can be tricky to make sure you're
egtting the right one.  I had to edit config.in from the BerkeleyDB
distribution before it worked for me.

The fact that this works under command-line scripts does point to your
mod_perl being linked to a different version of perl, as Vivek pointed
out.

- Perrin

Reply via email to