使用 macport 在 Mac OSX 上通过 Worker mpm 安装 PHP FCGI 和 Apache
我正在使用 FCGI 和 apache 以及 Worker MPM 安装 PHP 服务器 这是我到目前为止所做的:
sudo port install apache2 +workermpm
sudo port install php5 +fastcgi
sudo port install mod_fcgid
当我尝试加载 apache2 并
sudo port load apache2
更改 httpd.conf 设置时:
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule mod_fcgid.c>
AddHandler fcgid-script .php
DefaultMaxClassProcessCount 4
DefaultInitEnv PHP_FCGI_MAX_REQUESTS 0
DefaultInitEnv PHP_FCGI_CHILDREN 0
FCGIWrapper /opt/local/bin/php-cgi .php
<Files *.php>
Options +ExecCGI
</Files>
SharememPath /opt/local/apache2/fcgid/shm
</IfModule>
我在 /opt/local/apache2/logs/error_log 上收到此错误
[Mon Sep 05 09:54:00 2011] [emerg] (17)File exists: mod_fcgid: Can't create shared memory for size 682600 bytes
有人遇到过此问题吗?请告诉我如何解决这个问题。
谢谢
I am installing a server for PHP using FCGI and apache with worker MPM
here is what I have done so far:
sudo port install apache2 +workermpm
sudo port install php5 +fastcgi
sudo port install mod_fcgid
when I tried to load apache2 with
sudo port load apache2
changes on httpd.conf settings:
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule mod_fcgid.c>
AddHandler fcgid-script .php
DefaultMaxClassProcessCount 4
DefaultInitEnv PHP_FCGI_MAX_REQUESTS 0
DefaultInitEnv PHP_FCGI_CHILDREN 0
FCGIWrapper /opt/local/bin/php-cgi .php
<Files *.php>
Options +ExecCGI
</Files>
SharememPath /opt/local/apache2/fcgid/shm
</IfModule>
I got this error on /opt/local/apache2/logs/error_log
[Mon Sep 05 09:54:00 2011] [emerg] (17)File exists: mod_fcgid: Can't create shared memory for size 682600 bytes
Anybody has encountered this problem? please tell me how to solve this.
Thank You
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚解决了这个特殊问题。目前 mod_fcid 的 Macport 存在问题,似乎需要目录 /opt/local/apache2/var/run/ 才能在启用 mod_fcgid 的情况下启动。它似乎无法识别 SharedmemPath 设置或其他配置开关。
只要创建这个目录,apache 就会启动。
I just solved this particular problem. Currently the Macport of mod_fcid has the problem, that it seems to need the directory /opt/local/apache2/var/run/ for starting up with mod_fcgid enabled. It seems not to recognize the SharedmemPath-setting or other configuration switches.
Just create this directory and the apache starts up.