| Ian Wilkinson 2004-12-23, 3:58 pm |
| I am testing my PHP scripts locally under XP Home SP2 / apache 1.3.23 / PHP
4.3.9 but I can't get a simple DBM script to work. No problem running it on
my remote site, under Unix.
Locally, phpinfo() gives:
DBA support: enabled
Supported handlers: cdb cdb_make db3 inifile flatfile
This encourages me to think that I could open a database with db3 - so, my
test script reads:
$order_dbpath = "C:\Apache\htdocs\data\orders.db";
$dbtype = "db3";
$dbo = dba_open( $order_dbpath, "c", $dbtype ) or die( "Can't open Database
$order_dbpath" );
Running the script causes a zero-byte file (orders.db) to be created, but
results in the following browser output:
Notice: dba_open(): read: 0x12f550, 256: Permission denied in
c:\apache\htdocs\admin\orders.php on line 26
Notice: dba_open(): C:\Apache\htdocs\data\orders.db: Permission denied in
c:\apache\htdocs\admin\orders.php on line 26
Warning: dba_open(C:\Apache\htdocs\data\orders.db,c): Driver initialization
failed for handler: db3: Permission denied in
c:\apache\htdocs\admin\orders.php on line 26
Can't open Database C:\Apache\htdocs\data\orders.db
I can't figure out how to alter permissions under Windows XP or is something
else going wrong?
(A few w s ago I found a bug report on bugs.php.net, which I think said
this was a known problem, fixed in the latest release of PHP 4, but I can't
find this bug report again.)
Any suggestions please? Thanks very much. Ian
|