Error: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database cakephp

softboxkid picture softboxkid · Jul 3, 2015 · Viewed 9.3k times · Source

enter image description here

I don't know how to solve this problem. The problem happened when I deploy this project to production server using Apache web server. I try to change DocumentRoot on Apache webservers. (CakePHP documentation) but still no luck.

But if I run the project under development server using ./cake server command (http://localhost:8765/) it seems ok. I can create, retrieve, update, delete. No database error

enter image description here

Please help me.

Answer

Igor Greg picture Igor Greg · Jul 20, 2015

This issue is also related to another question about cakePhp 3.x

The error comes from the DebugKit plugin, which is activated in your site, as it's obvious by the screenshot. You need to make the file ROOT/tmp/debug_kit.sqlite, writable.