You are here: PHP Kernel Analytics> Main Web>LAMP>FCGIWrapperVsAction2009-07-10, Laruence

FCGIWrapper Vs Action方式

  • FCGIWrapper:
AddHandler fcgid-script .php

<Directory /var/www/>
FCGIWrapper /usr/local/bin/php-cgi .php
Options +ExecCGI
</Directory>

  • Action
AddHandler php-fcgi .php
Action php-fcgi /fcgi-bin/php5-cgi
AddType application/x-httpd-php .php
Alias /fcgi-bin/ /usr/bin/

<Location /fcgi-bin/>
SetHandler fcgid-script
Options +ExecCGI
</Location>

  • Comment
from my experience, both setups offer the same functionality in the 
end. I prefer using handlers to FCGIWrapper too, as it's much more 
flexible (as you noticed), you can have PHP4 and PHP5 compiled with 
FastCGI and switch on a per-directory context using AddHandler 
in .htaccess, rather then fiddling with Apache directives on 
httpd.conf level config (if .htaccess control is what you need/want). 
Furthermore your Apache config doesn't break if the PHP executable 
goes missing (unlike FCGIWrapper), which is important if you use 
wrapper scripts and suexec instead of calling the binary directly 
(e.g. for virtual hosting environment), and risk users getting rid of 
the wrapper scripts by accident.

-- Main.Laruence - 2009-07-10

 
Topic revision: r1 - 2009-07-10 - 08:10:02 - Main.Laruence
 

TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Supported by Onemouse/风雪之隅 京ICP备09034578号
Ideas, requests, problems regarding PHP Kernel Analytics? Send feedback