That seems like a good solution. Using the DB check on beforeFilter(), if
check fails render the error. This, like you said later, also assumes you
don't break one of those non-spoken rules: never load models on
AppController.

-MI

---------------------------------------------------------------------------

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!


-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de nate
Enviado el: Jueves, 30 de Noviembre de 2006 11:49 a.m.
Para: Cake PHP
Asunto: Re: Catching DB connection failure


Another solution that hasn't been brought up is to ship the app with a
default routes configuration, that always redirects you to a specific
controller that handles installations.  You could use the beforeFilter
of the installation controller to disable components that you didn't
want executing, and don't call parent::beforeFilter().

When the installation is completed, just replace the routes file with
the actual production version.  This approach saves a lot of overhead,
compared to bogging down the application with pre-checks, even after
the installation is complete.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to