使用fcgi配置apache

时间:2014-04-16 14:12:53

标签: apache apache2 xampp fastcgi mod-fcgid

我正在尝试使用fcgi模块配置Apache 2.4(XAMPP 1.8.3)。首先,我将mod_fcgi.so文件复制到apache / modules目录。之后,我将以下行添加到httpd.conf:

LoadModule fcgid_module modules/mod_fcgid.so

之后,我尝试启动Apache Server而不启动。它显示了这条消息:

Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies, 
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check the Windows 
Event Viewer for more clues.
If you need more help, copy and post this entire log window on the forums.

如果我评论此行,则服务器可以运行。

任何人都可以帮助我吗?

提前致谢!!

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,并让它发挥作用。

在php.ini中,激活正确的oci扩展名。 你必须使用与你的php版本和你的oracle相对应的oci扩展名。

您可以取消注释fcgi的loadmodule,但如果需要,可以在php.ini中取消注释:

LoadModule fcgid_module modules/mod_fcgid.so

FcgidInitialEnv PATH "C:/xampp/php;C:/instantclient_12_1;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/WINDOWS/Temp"
FcgidInitialEnv TMP "C:/WINDOWS/Temp"
FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 64
FcgidConnectTimeout 16
FcgidMaxRequestsPerProcess 1000 
FcgidMaxProcesses 50 
FcgidMaxRequestLen 8131072
# PHPRC is the location of the php.ini file
FcgidInitialEnv PHPRC "C:/xampp/php"
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000

<Files ~ "\.php$>"
  AddHandler fcgid-script .php
  FcgidWrapper "c:/xampp/php/php-cgi.exe" .php
</Files>

帕特里克