Dbm Problems

As distributed the wiki Perl script makes use of NDBM on systems like Solaris. From the Solaris dbm(3b) page we read that:


The sum of the sizes of a key/content pair must not exceed the internal block size (currently 1024 bytes). Moreover all key/content pairs that hash together must fit on a single block. store will return an error in the event that a disk block fills with inseparable data.


This means that your page has to contain information less than 1 kilobyte. So if, you have compiled Perl on your system with Berkeley DB[1] support, all you have to do is add the following line at the begining of the script:

use DB_File;

and you are OK. This has worked for me for Solaris 7 and Perl 5.6.0

YiorgosAdamopoulos


Gnu DBM (gdbm) doesn't have these limitations. I'd suggest to use that instead. -- StephanHouben Neither does Berkeley DB. Use whichever your heart (and maybe license preference) desires. I'm sure there are also others.


I recommend MySql over all these, for any relational dbms requirements that do not include atomic transactions with rollbacks, which it doesn't support in favor of raw speed. Its free too. http://mysql.org --- BradCox


AnswerMe Will WikiInHyperPerl generated script work for dbm's that only produce one file instead of .pag and .dir. That's my problem now. It doesn't


Basil Why does the DBI dbmopen routine produce .pag and .dir files inside CGI scripts that are not openable by scripts that are not in the CGI environment ?? I can "see" variables inside the CGI from a tie hash that I can not access from outside which is causing grief ??

any ideas ?? basil.duval@epfl.ch


CategoryWiki


EditText of this page (last edited May 28, 2002) or FindPage with title or text search