ID: 19220 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: DBM/DBA related Operating System: Windows NT 5.0 build 2195 PHP Version: 4.2.2 New Comment:
I am having the same problem. When ever I call dba_open () function I get the driver initialization failed. I have apache 2.xx installed on a Win 2K system and PHP 4 running as CGI. I read the above comment about permissions but as i am new to PHP and apache and am not at all familiar with unix i will need an idiots explanation. Previous Comments: ------------------------------------------------------------------------ [2002-09-04 20:49:58] [EMAIL PROTECTED] Thanks man. It was indeed permissions. Had overlooked the idea that Windows 2000 is not really a standalone system i.e. it is trying to mimic Unix in that it is trying to be a multi-use environment. ------------------------------------------------------------------------ [2002-09-03 20:20:44] [EMAIL PROTECTED] This sounds more like a local user error than a PHP error. Are you sure you have a) permissions to write the file, and b) permissions to read the file? ------------------------------------------------------------------------ [2002-09-03 20:07:03] [EMAIL PROTECTED] Constantly getting this error and am not able to make any progress. I believe this to be a bug on PHP installed as a module. Warning: driver initialization failed in c:\program files\apache group\apache\htdocs\anyatha3\login_fes\login_test.php on line 11 Failed opening existing dba file:passwords.db Warning: Unable to find DBA identifier 0 in c:\program files\apache group\apache\htdocs\anyatha3\login_fes\login_test.php on line 26 Warning: Unable to find DBA identifier 0 in c:\program files\apache group\apache\htdocs\anyatha3\login_fes\login_test.php on line 37 USERID = The script that I am running is: <?php $handler_name = "db3"; $file_name = "passwords.db"; # $file_path = "../../ua_fes"; $file_mode = "passwords"; $user_id = "adrianlunga"; $user_pwd = "password"; if (file_exists($file_name)) { $db_id = dba_open($file_name, "w", $handler_name); if (!$db_id) { echo "Failed opening existing dba file:".$file_name."\n"; } } else { $db_id = dba_open($file_name, "n", $handler_name); if (!$db_id) { echo "Failed opening new dba file:".$file_name."\n"; } } if (dba_exists($file_name, $user_id)) { $last_seen = dba_fetch($user_id, $db_id); } else { # dba_insert($file_name, $userid, $password); } # do_stuff(); # dba_replace($string_handlername, $userid, time()); dba_close($db_id); echo ("<HTML>"); echo ("<HEAD>"); echo ("<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">"); echo ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=windows-1252\">"); echo ("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"../../../main.css\">"); echo ("<TITLE>"); echo ("Login Page"); echo ("</TITLE>"); echo ("</HEAD>"); echo ("<BODY TEXT =\"black\""); echo (" LINK =\"blue\""); echo (" VLINK =\"black\""); echo (" ALINK =\"blue\""); echo (" BACKGROUND =\"../images/indtextb.jpg\""); echo (" BGPROPERTIES =\"fixed\""); echo (">"); echo "USERID = ".$last_seen; echo ("</BODY>"); echo ("</HTML>"); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19220&edit=1