5

We are trying to set up multiple PHP versions running in parallel in our staging environment. To achieve this, I built all relevant PHP binaries (w/ --enable-fastcgi where applicable) and am using mod_fastcgi to invoke the former via wrapper scripts.

If at all relevant, here's /php-fcgi/php-5.5:

#!/bin/sh
PHPRC=/usr/local/php55/etc/php.ini
export PHPRC

PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS

PHP_FCGI_CHILDREN=3
export PHP_FCGI_CHILDREN

exec /usr/local/php55/bin/php-cgi

This is all working fine so far (i.e. all virtual hosts configured to run w/ PHP 5.5 are running on 5.5, etc.); there is however a problem with environment variables set with "SetEnv" in the <Directory> block. All of those are prefixed with REDIRECT_.

Example for this:

SetEnv APPLICATION_ENV "production"

Will result in this output:

'REDIRECT_APPLICATION_ENV' => string 'production' 

Can anyone advice on what I have done wrong?

Clarification on why this is not mod_rewrite related: This behaviour also occurs even when entirely disabling mod_rewrite.

  • http://serverfault.com/questions/418299/how-to-prevent-apache-from-prepending-redirect-to-environment-variables-when-ru – CBroe May 09 '14 at 10:03
  • Possible duplicate of [When setting environment variables in Apache RewriteRule directives, what causes the variable name to be prefixed with "REDIRECT\_"?](http://stackoverflow.com/questions/3050444/when-setting-environment-variables-in-apache-rewriterule-directives-what-causes) – Simon Aug 11 '16 at 09:32

0 Answers0