CakePHP deployment errors

by frank on August 12, 2008

in Tips of the Week

If you have set cakephp up so that DocumentRoot of apache is pointing to app/webroot/ you might have encountered a couple of errors like these – not the first time you set it up, but consequent attempts to remove and replace the files.


Cannot load * class OR Cannot redefine * class

These sorts of errors were cropping up for me when I deleted all the files and did a fresh check out of the cvs repository to the server. Strangely, the next morning the errors had disappeared.

So, after brainstorming with the sysadmin about cron jobs etc. it turns out that apache was doing a graceful restart overnight, and when you set the DocumentRoot to point to app/webroot/ then remove that folder – even if you recreate the same folder/same permissions etc. apache needs a restart.

More posts like this one:

  1. CakePHP redirect to admin methods

Was this article useful?

rss feed icon

Email this article to yourself or...

rss feed icon

Subscribe to the RSS feed for more useful articles and tips.

Share this article with others

  • del.icio.us
  • Twitter
  • Reddit
  • StumbleUpon
  • Facebook
  • Digg