From: Jeff D. <da...@da...> - 2001-03-07 02:09:09
|
>> Warning: no such handler: gdbm in /var/www/devel.spack.org/phpwiki/lib/dbali > b.php on line 39 > >I can't find any reference to this error on the PHP site... perhaps you >could email the maintainer of the PHP package for Debian? I wish I could >offer more but at the moment I'm stumped. The dba_ functions are an interface to several of the dbm-style database libraries. 'Gdbm' is only one of the types of databases possible --- others include 'dbm', 'ndbm', 'db2', db3'. Which ones are available in your PHP are determined at PHP compile-time. To see which ones are supported in your php, create a file within your web document tree called, say, 'info.php' containing one line: <?php phpinfo(); ?> Then browse this file with your browser, you'll get a big page full of all kinds of information about the configuration of your PHP. A ways down that page there should be a table labeled 'dba'. It should look something like: DBA support | enabled Supported Handlers | gdbm db2 db3 (Except, I suspect in your case gdbm won't be listed as a supported handler.) Pick one of the handlers which is supported --- I'm not completely up to snuff on the differences between them all, but my guess is to prefer, in this order: gdbm, db2, db3, ndbm, dbm. Change line 39 in dbalib.php from while (($dbi[$key] = @dba_open($file, "c", "gdbm")) < 1) { to while (($dbi[$key] = dba_open($file, "c", "db2")) < 1) { I.e. change the "gdbm" to "db2" (or whatever dba handler your PHP supports.) I think that should work. (I've just tested it with 'db2' and that seems to work fine.) Jeff Note to maintainers: We should look into this a bit more. Also make the code auto-detect which handlers are supported. |