Check your settings while migrating Cake projects

Today I decided to restart the work of a project. The restart includes migration on the other machine as well as updating the Cakephp lib with the final version on the server.

So I copied the whole directory of the project on the second computer /which meant to be the server from now on/ and after this in the cake directory and typed “svn update”. There were some changed files and I received the latest version on the server. So far, so good.

Then I migrated the DB as well, but I decided to follow a new name convention for databases – all database names to follow the full server name i.e. for mydomain.com I would have a mydomain_com /because MySql doesn’t allow dot in the name I replaced dot with underscore/. on the old computer the database was called “mydomain”.

Ok, I changed /app/tmp permission and I decided to see what was the impact of all these actions.

Surprisingly I’ve seen blank screen instead of application screen. I said myself “sh*t, what’s happened? Does the svn update ruin everything? Am I using too old code style?”. Start digging into the code, but whatever I made there wasn’t any change on the screen. Really odd situation. do I found the second “BIG” bug in the cakePHP lib :D, well not true. Here is the explanation.

Finally after 1/2 hour I realized that I’ve changed the name of the database and the old database name doesn’t exist on the server :D. I agree, it’s stupid error and it’s all my fault, but I am wondering why there is no error message telling, that there is no such DB on the server or similar?

I know that on the home.ctp page, which is the default page when you checkout cake from the repository where you can see if the app is connected or not, but what’s happen, when you don’t use this page? Or even as it is in my other project when I rewrite the page controller and I cannot access the default start up page at all?

I think there should be a way which could notify the developers for such stupid “error” or misconfiguration. At lease if the debug level is set to 2 or 3 it should warn I guess.

2 thoughts on “Check your settings while migrating Cake projects

  1. rafaelbandeira3No Gravatar

    I fell on something similar on last week, but I didn’t just got the blank page with no notices or warnings, I also noticed a heavy cpu usage and a very long time for the server response. Know why? My AppController configurations, wich are also applied to error handling actionRequests, were making errors to run in a infinite request loop… It cost me a lot of time, debug lines and stupid logging…

    — your security code error message erases the comment form… very annoying. Luckly, I always copy it…

Leave a Reply

Your email address will not be published. Required fields are marked *