Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Change in Berkeley DB in Perl 5.12?

by RobbieSnr (Novice)
on Oct 02, 2011 at 13:48 UTC ( #929149=perlquestion: print w/ replies, xml ) Need Help??
RobbieSnr has asked for the wisdom of the Perl Monks concerning the following question:

I have a Mac and prior to installing Lion I had both the native Perl 5.10 and ActivePerl 5.8 installed. I use MAMP PRO to set up virtual hosts so that I can test some CGI scripts on the Mac before uploading them to the live server. I use DB_File to save data in Berkeley DB files and found that those files set up with 5.8 could be read by 5.10. Since upgrading to Lion that now uses 5.12 I find that 5.12 won't read the files set up with 5.8.

Does anyone know why this is?

Comment on Change in Berkeley DB in Perl 5.12?
Re: Change in Berkeley DB in Perl 5.12?
by armstd (Friar) on Oct 02, 2011 at 14:45 UTC

    Did you switch from 32bit to 64bit Perl (or vice versa) in the process? I don't believe BerkeleyDB is platform-independent in terms of integer representation, so endian and size matter.

    It would help if you gave more information, like the errors you're seeing, what you've done to debug this already, and so on. There's not much to work with here.

    Update: Oh, I also recall that changing your underlying BerkeleyDB version will also break things, perhaps Lion moved you forward a version. In either case, you probably have to dump and rebuild your database files for your new configuration.

    --Dave

      Dave

      I'm very sorry I've not replied until now - had been expecting emails with the replies.

      I have come across this problem in another situation, and can give more information. A website I was involved with was running a BB that used DB_File to produce Berkeley DB files. It has recently upgraded its software and these files can't now be read. I've been investigating this and find that previously it had Perl 5.8.8 with DB_FIle 1.814 using the DB engine version 4.4 but now it has Perl 5.10.1 with DB_File 1.82 and DB engine version 4.7. I suspected that the problem lay with the DB engine upgrade and you've confirmed that this is the case. I did check with Oracle but they couldn't definitely confirm that an upgrade in version 4 would cause a problem.

      I was fortunate in that I had enough information to rebuild the database files. Others could have problems if they didn't have another source for the database information as they wouldn't be able to dump the database if they couldn't now read it? Can you point me to where it's mentioned that the DB engine upgrades can cause problems. I see that ActiveState still use version 1 of the DB engine even with the DB_File they issue with Perl 5.12.

      Eric

Re: Change in Berkeley DB in Perl 5.12?
by perlfan (Curate) on Oct 02, 2011 at 15:38 UTC
    I never heard of MAMP PRO. I checked it out, and it seems like what PHPTriad is/was for Windows. These days I develop on a Mac and use VirtualBox to emulate my production environment (CentOS). It's seemless and I don't have to deal with the pesky case insensitivity of the default MacOS filesystem.
      I already had Parallels to allow me to run virtual machines. MAMP Pro was just what I needed to set up virtual hosts to test the CGI scripts I run on different websites. It's an acronym for Mac, Apache, MySQL and PHP and so It comes with PHP and an Apache web and MySQL database servers, with phpMyAdmin to access my databases. It was very easy to set up and meets all my needs.
Re: Change in Berkeley DB in Perl 5.12?
by Anonymous Monk on Oct 02, 2011 at 19:25 UTC
Reaped: Re: Change in Berkeley DB in Perl 5.12?
by NodeReaper (Curate) on Oct 03, 2011 at 13:22 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://929149]
Approved by toolic
Front-paged by perlfan
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2014-09-16 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (13 votes), past polls