The error开发者_如何学运维-Warning: sqlite_query() [function.sqlite-query]: attempt to write a readonly database is coming whenever i try to insert values into a sqllite 1.1 database thru php program. php version is 5.2.
attempt to write a readonly database
Beyond the version issues that have already been pointed out, this error happens under two circumstances:
- The file is owned by the same user running PHP, and permissions on the file or directory are not wide enough to allow PHP to modify the file
- The file is not owned by the same user running PHP, and permissions on the file or directory are not wide enough to allow PHP to modify the file
Correct either ownership or permissions, and the problem will be resolved.
精彩评论