Mark Matthews wrote:
> Hello,
> 
> I am moving a website that now resides on a i686 server running RedHat
> 6.2 with perl v5.005_03 to another i686 server running Suse 7.1 with
> perl v5.6.1.
> 
> The website uses a number of cgi scripts that read and write from
> BerkeleyDB files using the tie function.
> 
> The site is currently running fine on the RedHat server, but when
> testing the scripts on the Suse box I am finding the the scripts are
> failing complaining that the db file cannot be opened.
> 
> The function calling the script is as follows...
> $db = "blurb";
> tie(%BLURB, "DB_File", $db, O_RDONLY, 0664) || die("Error: could not
> open $db: $!\n");
> 
> Things I have tried so far..
> - I have checked that the BerkeleyDB file (blurb) in the right path, and
> is readable/writable.
> - I have checked  that the DB file is not corrupt by ftping it back to
> the RedHat box and testing it.. Works fine..
> - the command "file blurb" shows that the db file is Berkeley DB (Hash,
> version 5, native byte-order) and my guess is the version of DB_File
> cannot read that DB version.   I have installed earlier versions of
> DB_File on the Suse box with no luck.
> - I have successfully created a new db file using tie. The file created
> is version 7.
> 
> Since these scripts do infact work on the RedHat server, what do I need
> to do to get them to work on the Suse server

Mark, I doubt this has anything to do with mod_perl.

Have you tested the functionality as a standalone script or even a one 
liner?

In any case make sure that you have the same versions of BerkeleyDB and 
DB_File installed on both machines. Notice that there are three 
different major versions of BerkeleyDB. The latest BerkeleyDB versions 2 
and 3 require a different Perl module: BerkeleyDB.pm and it won't work 
with older 1st version of BerkeleyDB lib.

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/

Reply via email to