Hi, I'm forwarding the bug report, the original report is available on the Debian Bug Tracker[1]. Please CC: [EMAIL PROTECTED] in replies.
"Eugene V. Lyubimkin" <[EMAIL PROTECTED]> writes: > I've spent several days in investigating strange problem and it would be > good to deal somehow with it. > > SQLite database consists of one file. But, is is unsufficient to have > write rights to this database file to perform 'INSERT' statements. At > least, this perl package have requirement user should have write rights > to directory containing this file too. Otherwise, my 'INSERT' statement > ($sth->execute(...)) will fail with error: > > -8<- > DBD::SQLite::st execute failed: unable to open database file(14) at > dbdimp.c line 403 at /var/www/search-site/cgi-bin/register.cgi line 31, > <STDIN> line 1. > ->8- > > I was very confused to see this while having all necessary right on > database file. Please document this or rather extend the error message. This behavior is documented in the SQLite documentation[2]. The SQLite library may create temporary for various reasons, even when only using SELECT statements (see [2], 2.5). I prepared a small patch adding a note about this in SQLite.pm. Regards, Ansgar Footnotes: [1] http://bugs.debian.org/506157 [2] http://www.sqlite.org/tempfiles.html -- PGP: 1024D/595FAD19 739E 2D09 0969 BEA9 9797 B055 DDB0 2FF7 595F AD19
Index: lib/DBD/SQLite.pm =================================================================== --- lib/DBD/SQLite.pm (revision 27003) +++ lib/DBD/SQLite.pm (working copy) @@ -544,6 +544,10 @@ =head1 NOTES +Although the database is stored in a single file, the directory containing the +database file must be writable by SQLite because the library will create +several temporary files there. + To access the database from the command line, try using dbish which comes with the DBI module. Just type: