开发者

CakePHP: Missing database table

开发者 https://www.devze.com 2022-12-25 15:11 出处:网络
I have a CakePHP application that is running fine locally. I uploaded it to a production server and the first page that uses a database connection gives the \"Missing Database Table\" error. When I lo

I have a CakePHP application that is running fine locally. I uploaded it to a production server and the first page that uses a database connection gives the "Missing Database Table" error. When I look at the controller dump, it's complaining about the first table.

I've tried a variety of things to fix this problem, with no luck:

  • I've confirmed that at the command line I can login with the given MySQL credentials in database.php
  • I've confirmed this table exists
  • I've tried using the MySQL root credentials (temporarily) to see if the problem lies with permissions of the user. The same error appeare开发者_如何学编程d.
  • My debug level is currently set to 3
  • I've deleted the entire contents of /app/tmp/cache
  • I've set 777 permissions on /app/tmp*
  • I've confirmed that I can run DESCRIBE commands at the commant line MySQL when logged in with the MySQL credentials used by by the application
  • I've verified that the CakePHP log file only contains the error I'm setting in the browser window.
  • I've tried all the suggestions I could find in similar postings on SO
  • I've Googled around and didn't find any other ideas

I think I've eliminating the obvious problems and my research isn't turning anything up. I feel like I'm missing something obvious. Any ideas?


Did you try checking to see if the production database is being picked up correctly ? Try an echo on the production server, and see what database it selects. Also, make sure the tables don`t have different case names, than on the production server. MySQL can be configured to make a difference between 'Table' and 'table'. You may have some lines of code that are selecting different databases based on the TLD, like I see being done many times.


Epic fail on my part. There was a space at the end of my database name in the database.php. Interesting that this didn't return a connection issue (perhaps they trim the name on testing the connection?).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号