I found this similar question but my problem is different.
I moved my CakePHP 2.2 application to another server. There exists no problem before migration. Most of
Have you checked your database, e.g. in phpMyAdmin or MySql workbench? Does the table exist in the database?
The error message indicates that the table could not be accessed using the default connection. It's possible that the table is really missing, or that the user you're using to connect to the database does not have the right permissions for that table.
If you migrated the database from another server, did you get error messages while importing? If you did not create a dump enclosed in a transaction, it's possible that the database dump was only partially imported.
[update] this suggestion solved the problem;
Remove all files from app/tmp/cache/persistent
and /app/tmp/cache/models
then enable debugging. Your SQL log/debug should show the queries that CakePhp is using to detect if the tables exist in the database. Also you'll be able to check if Cake writes to the tmp files without problems
If this is helpfull for anyone in 2020.
I had this problem even with full permissions to the model. I tried doing like @theJeztah suggested which was clearing cache/persistent but the problem persisted. What ended up working was switching Configure::write('debug', 0)
to Configure::write('debug', 2)
in the app/core file
. Presumably on debug it clears the cache better.