Just investing in context to clarify the primary question:
On my small development machine, PHP5.3.1 is a component of Apache like a module, I personally use SetEnv APPLICATION_Atmosphere rise in my application's root .htaccess file. This will make it easily retrievable from the php script with getenv('APPLICATION_ENVIRONMENT').
Around the production server, on the sharedhost (dreamhost), I put together myself php5.3.1 since it wasn't directly supported. Everything works fine with the exception that getenv('APPLICATION_ENVIRONMENT') returns false.
Within the sharedhost root .htaccess for my domain, I personally use this .htaccess file
Options +ExecCGI AddHandler php-cgi .php Action php-cgi /cgi-bin/php.cgi <FilesMatch "^php5?.(inicgi)$"> Order Deny,Allow Deny all Allow from env=REDIRECT_STATUS </FilesMatch> Options -indexes
php5.cgi resides in /cgi-bin and is effective. Obviously during my application's root folder I've another .htaccess determining:
SetEnv APPLICATION_Atmosphere production
However when using getenv('APPLICATION_ENVIRONMENT') it returns false, any idea how you can resolve this?
SetEnv directive to operate, your hosting service should have the
mod_env module triggered...
But, even when it's triggered, maybe it's not necessary to permission to make use of
Just to be certain the issue is not inside your code, you might like to look into the ouput of
phpinfo() : at the end from the page, there must be a piece that contains atmosphere variables as seen from PHP -- if yours isn't inside, it's a bad sign for you personally...
Ok I finally first got it. On dreamhost, you'll be able to use fastcgi and for that reason declare atmosphere variables by using it. It includes just adding this straightforward script
#!/bin/sh export PHP_FCGI_CHILDREN=2 professional /home/USERNAME/YOURDOMAIN/cgi-bin/php.cgi
That is where my put together PHP5.3.1 was situated. chmod 744 on that file known as dispatch.fcgi which is permitted more memory by dreamhost's watchdog.
Next I put into my domain's .htaccess the next:
Options +ExecCGI AddHandler fastcgi-script fcg fcgi fpl AddHandler php5-fastcgi .php Action php5-fastcgi /dispatch.fcgi
now within the application's root I've another .htaccess with:
SetEnv APPLICATION_Atmosphere staging
Inside a php script it's retrievable via getenv('REDIRECT_APPLICATION_ENVIRONMENT')
Perhaps you have to make use of