Skip to content


Tip of the week : CakePHP deployment errors

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.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • Fark
  • Reddit
  • StumbleUpon

Profile:  Frank has been programming for the web using PHP, Javascript and numerous libraries and frameworks for the past 5 years. More articles.

Posted in Tips of the Week. Tagged with cakephp, PHP, tip.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.