A
Anno Siegel
botfood said:------------
irrelevant at this point... by copying a db file from the website that
is working, and running the same test program on it, with the same
local path, it was able to tie() without error and tell me the number
of records in the file. Pretty much sells me that the file I restored
from the host that melted down is 'slightly corrupted', or at least the
file descriptors are messed up somehow such that tie(0 cant figure the
file out even though it exists and is readable as far as the -f and -r
tests went.
so... the question now becomes whether anyone can hazard a guess how
a file can exist and be readable to -f and -r, but returns an error 'No
such file or directory' from tie() using DB_File.
The error in $! is probably misleading. It contains the last system
error the program encountered, but we don't know if the failed tie()
actually caused the error. It could come from anywhere.
Repairing a defect database can be tricky or impossible. I'd try to
get diagnostics directly from Berkeley DB. DB_File doesn't seem to
have debug options. There is also the more general module BerkeleyDB.
I don't know it, but I'd take a look there.
The Berkeley DB web site is http://www.sleepycat.com. There is also
a mailing list at (e-mail address removed).
Anno