Hi Stephan,

Besides using inheritance in the Zend_Config I also use a variable to make sure no debug information is sent to the browaers from a live website. In the bootstrap I do the following:

$islive is set to TRUE or FALSE according to the $_SERVER['HTTP_HOST'] variable (but that's being cursed at the moment so you might not want to take that path ;)

Then:

-------------------------
// Create a Zend_Controller_Front object
$front = Zend_Controller_Front::getInstance();
$front->throwExceptions(!$islive);
$front->returnResponse(true);
$front->dispatch();

$response = $front->getResponse();
if ($response->isException()) {
   Zend_Debug::dump($response, 'Response', $islive);
}

echo $response;
-------------------------


So no throwExceptions() and no Zend_Debug::dump() when we're in a live situation.

Cheers,


Ramon de la Fuente



Stephan Stapel wrote:
Hi!

I guess a lot of you have the problem to have code that is used within multiple environments, a (local) environment for development, another for testing and a third for production.

Usually, some things like database configuration differ between these environments. I was asking myself if anyone has a smart solution for a flexible configuration such that no additional files have to be renamed/ moved when deploying.

If someone has a good solution, would he/she like to share it?

Regards,

Stephan


--
Ramon de la Fuente
Future500 BV

Graaf Janstraat 143
2713 CK ZOETERMEER
tel: +31(0) 79 3164428
fax: +31(0) 84 7160626
mob: +31(0) 6 53443008

@: [EMAIL PROTECTED]
w: www.future500.nl



Reply via email to