On Tue, Feb 3, 2009 at 2:43 PM, howard chen <[email protected]> wrote: > Hello all, > > On Tue, Feb 3, 2009 at 4:14 PM, Rob Allen <[email protected]> wrote: >> >> There are many many ways ;) >> >> Personally, I use an environment variable set in the httpd.conf file using >> the SetEnv Apache statement and then use getenv() to collect it in the PHP. >> I then fall back to a define if an environment variable can't be found. >> > > The reason I ask is since we have app.ini (according to QuickStart > guide), why not define it in app.ini so you can define all stuff in > one place? But this is not possible in the example as > "APPLICATION_ENVIRONMENT" at the very first beginning so you need to > manually define in two places. > > On the other hand, define in Apache make sense, since you have > different servers, so even your copy the whole program sources from > production server, without any modifications, the setting is already > on. (In fact, I usually define all mysql accounts in httpd.conf)
The reason why the APPLICATION_ENVIRONMENT is not defined in the app.ini is that this would typically create a race condition since app.ini uses different sections that ressemble the environment. Till
