On 8/24/2011 9:08 AM, Eric Robertson wrote:
> I have a problem with DB_File and Perl 5.12. I posted a message on the ASPN 
> message board but no one there has come back with an
> answer so I’m trying here.
>
> I have some Perl CGI scripts which were developed some time ago using 
> ActivePerl 5.8. When my Mac OS started using 5.10 I considered
> upgrading my version of ActivePerl to 5.10 but I couldn't find a couple of 
> modules I needed - DBD::CSV and DBD::mysql - so I decided
> to continue to use 5.8. These scripts produce BerkeleyDB files using DB_File 
> and I found that when I was remotely debugging these
> scripts on my virtual host on the Mac these files could be read OK although 
> the Mac was using the inbuilt 5.10 because the scripts
> contained the normal /usr/bin/perl shebang line.
>
> I've recently upgraded the Mac's OS to Lion and I see that the inbuilt Perl 
> version has been changed to 5.12. I now find that I get
> an error when I try to read the BerkeleyDB files. I've used the followed code 
> to test the situation and found that 5.12 won't access
> files produced by ActivePerl 5.8 and vice versa - the error message is "Can't 
> open test.dbm: Inappropriate file type or format".
>
...
>
> Is the problem something to do with the BerkeleyDB code rather than Perl and 
> how can I correct this? I  know I could change the
> shebang line in my code when testing on my server but I'd have to remember to 
> change this before I uploaded the code to the live
> server - which I'm likely to forget!

I don't know the exact answer to your problem, but a while back I had a
similar problem and I ended up writing a script that converted the DB
to a flat file (using the old DB module) and then I wrote a script that
converted the flat file back to a DB using the new modules (I believe I
ran the first part at home and then uploaded the flat files to my website
and then ran the conversion to the new DB there).  It's at least a
workaround.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to