Re: SetEnv directives in VirtualHost configuration not accessible in PHP

From: Date: Fri, 16 May 2008 14:10:57 +0000
Subject: Re: SetEnv directives in VirtualHost configuration not accessible in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-274424@lists.php.net to get a copy of this message
If you are on apache2 server, try |$myvar = apache_getenv("|APP_CONFIG_SECTION|"); echo $myvar and see if it has value that you expect | Dietrich Bollmann wrote:
Hi, I have the following directive in my virtual host configuration: SetEnv APP_CONFIG_SECTION "development" and would like to access the value from PHP with getenv('APP_CONFIG_SECTION') or $_SERVER['APP_CONFIG_SECTION'] or whatever. But none of them work. Is there any PHP / Zend / Apache2 / ... configuration option etc. I have to activate / deactivate in order to use SetEnv? I am using the Debian packate apache / php installation and the current version of the Zend Framework. I tried to use `safe_mode_allowed_env_vars = PHP_, APP_CONFIG_' in php.ini - but this didn't change anything either. mod_env seems to be loaded also: /etc/apache2/mods-enabled/env.load -> ../mods-available/env.load Thanks, Dietrich
-- Open Source ALL content management with streaming video http://wiki.sharedlog.com

« previous php.general (#274424) next »