The error probably comes from this line of code:
$db = sqlite_open("test.db") or die("failed to open/create the
database");

I know nothing about this configuration, but when sqlite_open fails, my
first instinct is a permissions issue. sqlite_open("test.db") attempts
to create or open a file "./test.db" ("./" is relative to the working
directory of the process, whatever that may be).  The process needs
appropriate read/write/create permissions to do this.

You can test your permissions by creating another plain file in the same
script.  If you don't have create permissions here, you could alter the
permissions for the directory, or give a full or relative path to a
directory in which you do have permissions.  

I'd also note that this script does not look threadsafe (a real issue if
you're actually going to have multiple users querying it from web
browsers).  There is a race condition that begins with the test for file
existence and ends with the creation of the database table based on that
condition.

Pat


-----Original Message-----
From: greenshire [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 21, 2006 7:55 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] help with win32/iis install

 Greetings.  I recently installed php 5 on Win 2k3 server (iis 6).  I
enabled the pdo and sqlite extensions for sqlite, but using the test
script
from
 http://www.tanguay.at/installPhp5.php5?step=8  ,
I get error message:  "failed to open/create the database."  Any ideas?

Thank you,
-- 
greenshire

Reply via email to