SQLite error ‘attempt to write a readonly database’ during insert?

The problem, as it turns out, is that the PDO SQLite driver requires that if you are going to do a write operation (INSERT,UPDATE,DELETE,DROP, etc), then the folder the database resides in must have write permissions, as well as the actual database file.

I found this information in a comment at the very bottom of the PDO SQLite driver manual page.

Leave a Comment