pro_php thread: Problems with dba_open() function.
Hello:
I have been trying to utilize Berkeley DB Style Databases from PHP4
scripts. I have been reading about this in a book "Professional PHP
Pogramming" and I saw that PHP3 distribution comes with
that "php3_dbm.dll" file included in its extensions directory.
But Iīm working with PHP4 on IIS 5.0 on Windows 2000 Server and it works
fine; and although I saw some reference to the file "php_dbm.dll" in some
guides, there is no dbm.dll in the package (PHP4) and I could not find it
in the net.
Nevertheless, while looking for the file, I found a pair of question and
answer in this manualīs page: http://www.php.net/manual/en/ref.dbm.php
there you can read this:
goodfield@g...
05-Feb-2001 07:16
Where can i find the php_dbm.dll ? Itīs not in the package !
webmaster@e...
14-Feb-2001 08:48
just add the php_db.dll extension and it works
And then I follow the suggestion and uncommented the line:
;extension=php_db.dll
and copied the dll file to \Winnt\System32 and it made no difference, but,
when I uncommented the line:
;extension=php_dba.dll
and copied the dll file to \Winnt\System32 it did work. But not as I was
expecting.
Prior to the change I was given this error by php engine:
Fatal error: Call to undefined function: dba_open() in
d:\inetpub\wwwroot\test.php on line 16
And after I changed the php.ini, copied php_dba.dll to \System32, and
restart the system, I got this warning:
Warning: no such handler: db2 in d:\inetpub\wwwroot\test.php on line 16
this handler refers to the third parameter of the function dba_open() in
the script. I have changed it by "gdbm" and by "dbm" and have got similar
warning messages.
I wonder if anyone could help me.
Thanks in advance.
Rub.