[htdig] [Again] Pb accessing docdb from Perl contribs

heddy Boubaker (boubaker@cenatoulouse.dgac.fr)
04 Feb 1999 14:52:39 +0100

 Following my previous message - that nobody answered to ;-( - I made some
 extra tests, checked carefully all version of all libraries, checked that
 the db was not corrupted at creation time, checked some other contrib perl
 programs (whatsnew, urllist, ...). Now I can locate where the error is
 approximately ;-(
 This is what my db look like (w/ dbinfo from BerkeleyDB perl module)
boubaker-sss.www@geant:bin/ > /usr/local/BerkeleyDB/bin/db_info /tmp/db.docdb
testing file /tmp/db.docdb...

File Type: Berkeley DB Btree file.
File Version ID: 6
Built with Berkeley DB: 2.3.1 or greater
Byte Order: Big Endian
Magic: 053162
boubaker-sss.www@geant:bin/ > /usr/local/BerkeleyDB/bin/db_stat -d /tmp/db.docdb
0x53162 Btree magic number.
6 Btree version number.
2 Minimum keys per-page.
1024 Underlying tree page size.
6 Number of levels in the tree.
17879 Number of keys in the tree.
1120 Number of tree internal pages.
6818 Number of tree leaf pages.
0 Number of tree duplicate pages.
42237 Number of tree overflow pages.
984 Number of pages on the free list.
470274 Number of bytes free in tree internal pages (59% ff).
4984588 Number of bytes free in tree leaf pages (29% ff).
0 Number of bytes free in tree duplicate pages (0% ff).
0 Number of bytes free in tree overflow pages (100% ff).
 This is the kind of error I get w/ contrib perl scripts
x outside of string at ./whatsnew.pl line 293.

 That is this line:
        elsif ($what == 11)
            # DESCRIPTIONS
            $count = unpack("i", $value);
            $value = substr($value, 4);
            $result = "";
            foreach (1 .. $count)
                $length = unpack("i", $value);
>>> $result = $result . unpack("x4 A$length", $value) . "";
                $value = substr($value, 4 + $length);
            chop $result;
            $rec{"DESCRIPTIONS"} = $result;

 The parse_ref_record function is the same in all these scripts and it seems
 buggy, I do not know the internals of htdig dbs
 Please any anybody could help I really do need this script.
 Thanks a lot


- heddy - ------------------------------------ To unsubscribe from the htdig mailing list, send a message to htdig@htdig.org containing the single word "unsubscribe" in the SUBJECT of the message.

This archive was generated by hypermail 2.0b3 on Wed Feb 10 1999 - 17:09:05 PST