我正在使用PHP5.4.20,Apache2.4.6 VC10和FastCGI 2.3.9在Windows7机器上设置一个新的PHP环境。
在我的httpd.conf中,我加载FastCGI模块,并设置路径
LoadModule fcgid_module modules/mod_fcgid.so
FcgidInitialEnv PATH "c:/wamp/bin/php/php5.4.20;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidMaxRequestsPerProcess 1000
FcgidMaxProcesses 50
FcgidMaxRequestLen 1073741824
FcgidBusyTimeout 360
FcgidIOTimeout 360
FcgidInitialEnv PHPRC "c:/wamp/bin/php/php5.4.20"
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000
AddHandler fcgid-script .php
FcgidWrapper "c:/wamp/bin/php/php5.4.20/php-cgi.exe" .php然而,当查看phpinfo()时,环境路径是根据上面的配置设置的,但_SERVER" PATH“似乎是从命令设置的。
如何强制_SERVER“路径”与环境路径相同?
发布于 2013-10-14 14:10:10
要覆盖Apache中的_SERVER路径,您需要使用SetEnv路径,即使使用FastCGI也是如此。
SetEnv PATH "c:/wamp/bin/php/php5.4.20;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"https://stackoverflow.com/questions/19354337
复制相似问题