#600732 FcgidInitialEnv ignored

Package:
libapache2-mod-fcgid
Source:
libapache2-mod-fcgid
Description:
FastCGI interface module for Apache 2
Submitter:
Jamie McClelland
Date:
2013-08-21 00:33:04 UTC
Severity:
normal
#600732#5
Date:
2010-10-19 16:25:36 UTC
From:
To:
The FcgidInitialEnv directive does not seem to have any affect.

I've configured the following line in my virtual host:

FcgidInitialEnv PHPRC /srv/projects/default/php5

My wrapper script:

#!/bin/bash
exec /usr/bin/php-cgi

When I execute a php script with:

<?php echo getenv('PHPRC'); ?>

It returns nothing.

When I add to my virtual host configuration:

SetEnv PHPRC /srv/projects/default/php5

Then, my getenv command properly returns /srv/projects/default/php5.

I think this is another bug... but for the record, even with PHPRC set
by SetEnv, php-cgi still uses the default /etc/php5/cgi path to find the
php.ini file.

#600732#10
Date:
2010-10-21 01:11:35 UTC
From:
To:
See upgrade notes at http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

The old values still seem to be in use.  For example, I commented out the
new values here for the day they go live:

    DefaultInitEnv PHP_FCGI_MAX_REQUESTS 200
    # FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 200
    MaxRequestsPerProcess 200
    # FcgidMaxRequestsPerProcess 200

    <Directory /var/www/WHATEVER/>
        #
        # PHP as FastCGI has its own facility for terminating after handling
so many
        # requests (see PHP_FCGI_MAX_REQUESTS).  FcgidMaxRequestsPerProcess
helps avoid
        # sending additional requests to the wrapper application after it
has handled
        # its limit.
        #
        AddHandler fcgid-script .php
        FCGIWrapper /usr/lib/cgi-bin/php5 .php
        # FcgidWrapper /usr/lib/cgi-bin/php5 .php

#600732#15
Date:
2011-07-05 13:41:19 UTC
From:
To:
Hi,

I also had issues with FcgidInitialEnv PHPRC in virtual host context and
it looked like it was being ignored, however, phpinfo() told me it wasn't.

I was actually trying to add a single overriden variable per virtual host
(error_log location) and to accomplish that, I added a new
/etc/php5/cgi-local directory with php.ini symlinked back to /etc/php5/cgi.
But, then I didn't just symlink /etc/php5/cgi-local/conf.d back to
/etc/php5/cgi/conf.d, instead I made a new directory that included symlinks
to files in the generic conf.d, except that at the end I also placed my own
zz-local-override.ini file.

The problem there was that the PHPRC variable is wholly irrelevant as far as
conf.d location is concerned - I had to change the PHP_INI_SCAN_DIR variable
instead. This actually turns out to be even more convenient because I don't
have to touch PHPRC or php.ini itself.

HTH...

#600732#20
Date:
2013-08-21 00:29:05 UTC
From:
To:
pnegvuu mgjbsbpyer kmikq
zxqyjal bhcclydi esjzfzjfz
sevzd X X F C X P N A W
acglafg R X S A B Z K E X I D W Y
igrvw trfhkh riaahvlaicfmsa
qgpknuhosy rsikvl vuwvdkpbsl
dlyha R R X U L P Y L V Z C I C
vnnsnqijclb S L U V S R J B C A A P