You can do something like this directly on the public/index.php file.

if (!defined('APPLICATION_ENV')) {
    switch ($_SERVER['HTTP_HOST']) {
        case 'localhost':
            define('APPLICATION_ENV', 'development');
            break;
        case 'stagingdomain.com':
            define('APPLICATION_ENV', 'staging');
            break;
        default:
            define('APPLICATION_ENV', 'production');
    }
}


----- Mensaje original -----
> i'm doing the same thing. i usually use the SetEnv APPLICATION_ENV
> "staging"
> 
> but mod_SetEnv isn't enabled on the grid servers.
> 
> i have no idea to properly, automatically set the APPLICATION_ENV
> based on
> the domain.
> any help on this would be greatly appreciated.
> 
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/Best-practices-environment-setup-tp662770p4388719.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]

-- 
Alayn Gortazar

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to