Please help I am going crazy here. I have inherited a CodeIgniter site from a previous developer and he used an .sqlite file based database. I started getting the following error:
Error Number: HY000/8
attempt to write a readonly database
So I started debugging and dug deeper and deeper until I eventually got so frustrated with strange results I tried a real hardcore test of actually deleting the database file completely and the pages continued to load content from the database.
I then changed the database name in the hostname
value of the database config and created a brand new empty database file with that new name, ran the migrations, seeded the data and it all works. But! If I set the hostname
value back to the original database name it goes back to the earlier behaviour of somehow managing to load the content but giving readonly error when writing to it.
What the hell is going on! How is this possible? I have cleared the application/cache/database folder. Where is that data from the original database name being cached? What do I not understand about SQLite/CodeIgniter/Filesystems?