[FASTCGI] FastCGI PHP runtime configuration

Simon simon at optinet.com
Sun Nov 9 15:06:35 EST 2008


Thanks a lot, I wasn't aware about htscanner, how does it impact the performance
of scripts in your experience?

Can you elaborate on using wrapper around php spawning process? unless
I'm misunderstanding you, you do not need a wrapper, you can simply pass
PHP ENV variable PHPRC and tell it which php.ini to load. I already do this
but this is limited to the entire poll and is only done once when you re/start
apache when it first creates the poll of FCGI PHP processes. The problem
is I have different websites or even scripts within the same website using
the same poll of FCGI PHP which need different runtime configuration, thus
the need for something like loading from  .htaccess 

Thank you!
Simon




On Sun, 09 Nov 2008 20:50:36 +0100, Michiel Brandenburg wrote:

>Simon wrote:
>> I know some of you guys use FastCGI to run PHP scripts. Had anyone figured
>> out how to load runtime configuration parameters, such as those you can
>> load from .htaccess if PHP is run as a module, for each instance of FCGI request?
>> I know it is possible to load different php.ini for a poll of FCGI PHP processes
>> but I need to be able to load different php.ini or set of runtime parameters for
>> each FCGI PHP request from the same poll.

>If you use a wrapper around the php spawning process you can supply 
>another php.ini that will be used.  With php5 you can also supply 
>runtime configurations while spawning.

>You can also load the mod htscanner into php that will scan .htaccess 
>files for php settings (btw in php6 this will be default so no need to 
>load htscanner for 6, not that there are a lot of ppl running 6 atm but 
>still).  Apache will bork when trying to read the htaccess file (with 
>php settings) because it will not understand the php settings there. 
>There are 2 options (I use them both). 1. wrap the php settings stuff in 
>  <IfModule {some none existant mod, like mod_php4.c}> [setting here] 
></IfModule> to prevent Apache reading them (mod_php4 is not loaded so no 
>problem), and htscanner will ignore the IfModule stuff. 2. load a dummy 
>php mod that will only tell Apache it uses the php settings [and does 
>absolutely nothing with them].

>--
>Michiel Brandenburg

>_______________________________________________
>FastCGI-developers mailing list
>FastCGI-developers at mailman.fastcgi.com
>http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20081109/53665b2c/attachment.html>


More information about the FastCGI-developers mailing list