On 13 Dec 2009, at 7:15pm, FrankLane wrote:

> Well, I have such a file that I created, because with out it, I would get an
> error that reads:
> 
>  SQLSTATE[HY000] [14] unable to open database file
> 
> So I created a junk.sqlite file and I got
> 
>  SQLSTATE[HY000] [10] disk I/O error
> 
> so I changed permissions using  chmod 777 junk.sqlite  and that got rid of
> the error, and I continued on. After running the present program (which
> gives the error on fetchAll) the junk.sqlite file contains a single
> character - "S". This also happens if junk.sqlite is in the same directory
> as the php file. 

Then although you are not getting an error from your INSERT commands, they are 
not working correctly since if they were Apache would have created that file.  
You have two problems:

The database file must be created by SQLite, not you.  Even a blank database 
file has certain special things in the file.  You cannot just create a file 
with no contents and hope SQLite can use it.  You can either use your PHP 
program to create the database file or create it by using the sqlite3 
command-line tool.

Permissions have to be set so that Apache (not you yourself as a user) can read 
and write the database file.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to