|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-06-01 23:37 UTC] oceanwave-nospam- at linkline-nospam- dot com
When calling dba_open on Win32 (Apache version 1.3.24) using the db3 handler, it returns the following:
Warning: driver initialization failed in d:\docroot\dbawrite.php on line 2
The code is as follows (part of a news system):
function loadarticledb() {
return(dba_open("./nnews/articles.dbm", "c", "db3");
}
The function should create articles.dbm if it doesn't exist, as stated in the docs. I have php_dba.dll included as an extension (specified in php.ini), and phpinfo()'s dba section shows that dba is enabled and the db3 handler is the only available handler. I've been working at fixing this for a very long time, and any help is appreciated.
Thanks in advance!
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 17:00:01 2025 UTC |
I've got code that that uses dba_open() with the db3 handler and works with php4.1.2 on apache 1.3.19; yet the same code fails with php4.1.2 and apache 1.3.26. if(extension_loaded("dba")) { echo "okay - dba extension loaded<br>\n"; if(strlen($DB)) { # set in httpd.conf $dbtype = $DB; echo "okay - db is $DB<br>\n"; } else { $dbtype = "db2"; echo "okay - using db2<br>\n"; } $dbfile = "/usr/local/httpd/search/test-tuidb"; # info by tui if(file_exists($dbfile)) { echo "okay - tuidb file $dbfile found<br>\n"; $id = dba_open($dbfile, "r", $dbtype); if ($id) { echo "okay - open worked<br>\n"; $key = "tui"; if(dba_exists($key, $id)) { $keys = dba_fetch($key, $id); echo "okay - 'tui' entry is $keys<br>\n"; } else { echo "bad - no 'tui' entry found<br>\n"; } } else { echo "bad - open failed; "; echo "PHP error message: $php_errormsg<br>\n"; } } else { echo "bad - tuidb file not found<br>\n"; } } // if dba extension loaded else { echo "bad - no dba extension<br>\n"; } On the working machine: okay - dba extension loaded<br> okay - db is db3<br> okay - tuidb file /usr/local/httpd/search/test-tuidb found<br> okay - open worked<br> okay - 'tui' entry is YES OH YES On the non-working machine:okay - dba extension loaded<br> okay - db is db3<br> okay - tuidb file /usr/local/httpd/search/test-tuidb found<br> <br> <b>Warning</b>: driver initialization failed in <b>/usr/local/httpd/html/winamp/testit.html</b> on line <b>23</b><br> bad - open failed; PHP error message: <br> On both machines PHP was built with the same config options, apache was built with the same config options, the apache config files are largely the same (hostname and IP are changed), php conf files are identical. If I swap binaries and leave all the conf and html files as is, I can duplicate either situation on either machine. Here's how I configured PHP: './configure' \ '--with-db3' \ '--with-apxs=/usr/sbin/apxs' \ '--with-mysql=/usr/' \ '--enable-bcmath' \ '--with-config-file-path=/etc/httpd/conf' \ "$@" Here's how I configured Apache: ./configure \ "--with-layout=Mine" \ "--enable-module=all" \ "--enable-shared=max" \ "--with-perl=/usr/bin/perl" \ "$@" For kicks I just built PHP 4.2.1: same broken behaviour. It sure looks like something in the new apache is breaking this, but what? Why?