Re: PHP and DBA (db3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I assume you're using windows XP or 2000 or server 2003 and are using
NTFS.

When you get a "Permission dinied in e:\data\dhidata\meddictool2" it
means the server doesn't have permission to access the folder. You need
to go into the folder's properties to change that. I'm not sure how your
specific situation, but if you're using IIS I can help you. Email me back
if you still have trouble.

----- Original message -----
From: "Dietmar Hilke" <dhi01@xxxxxxxxxxx>
To: php-db@xxxxxxxxxxxxx
Date: Fri, 11 Jun 2004 12:52:23 +0200
Subject:  PHP and DBA (db3)

Hello!
Trying to bring that code to work on win32.

---
<h1>dba_perf_test.php</h1>
<?php

$handlers = dba_handlers(true);

print "<pre>";
print_r($handlers);
print "</pre>";

$dbtype = "db3";
$dbfile = "C:/dbfile";
$nrecs = 100;

echo "using datafile: $dbfile.$dbtype<br>\n";


$id = dba_open($dbfile.".".$dbtype, "c", $dbtype);
     if (!$id) { die("\n<br>dhi: could not open dbfile"); }

for ($i=0; $i<$nrecs; $i++) {
     $key = rand(1, $nrecs);
     $value = date("D M j G:i:s T Y");


     if(!dba_exists($key, $id)) {
         $ins = dba_insert($key, $value, $id);
         echo "inserted $key:$value in $dbfile.$dbtype<br>\n";
     }
}
dba_close($id);


/// Finds in db
$success = 0;
$id = dba_open($dbfile.".".$dbtype, "r", $dbtype);
     if (!$id) { die("could not open dbfile"); }
$success = 0;
for ($i=0; $i<$nrecs; $i++) {
     $key = rand(1, $nrecs);

     if(dba_exists($key, $id)) {
         $success++;
     }
}
dba_close($id);

?>
---

Result:

Warning: dba_open(C:/dbfile.db3,c): Driver initialization failed for 
handler: db3: Permission denied in 
e:\data\dhidata\meddictool2\dba_news.php on line 18

Any Ideas? Thanks!
dhi

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
  Marcjon

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux