在 Win Server 2008 上为 php5.2/5.3 模块配置 apache 2.2
我正在尝试在 Windows Server 2008 上为 php 5.2(或者最好是 5.3,但 php.net 似乎不这样做)配置 apache 2.2。C
:\Apache2.2\ C:\php\v5.2\
Apache 在我将其添加到 httpd.conf 之前运行良好
LoadModule php5_module "C:/php/v5.2/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php/v5.2/"
然后当我尝试从 cmd 重新启动它时 apache 会吐出此错误:
httpd.exe: Syntax error on line 129 of httpd.conf: Cannot load C:/php/v5.2/php5apache2_2.dll into server: The specified module could not be found.
它肯定在那里!
我用谷歌搜索了这个错误,发现很多人都在抱怨这个错误,但他们都是因为引用 php5apache2.dll
而不是 php5apache2_2.dll
之类的错误。
编辑:顺便说一句,当我使用安装程序并为我修改 httpd.conf 时,我在启动过程中仍然遇到找不到错误。卧槽……
I'm trying to configure apache 2.2 for php 5.2 (or preferably 5.3, but php.net seems to say not to) on Windows Server 2008.
C:\Apache2.2\
C:\php\v5.2\
Apache is running fine before I add this to httpd.conf
LoadModule php5_module "C:/php/v5.2/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php/v5.2/"
Then apache spits out this error when I try to restart it from cmd:
httpd.exe: Syntax error on line 129 of httpd.conf: Cannot load C:/php/v5.2/php5apache2_2.dll into server: The specified module could not be found.
It's definitely there!
I googled the error and found a lot of people complaining of it, but they're all for mistakes like referencing php5apache2.dll
instead of php5apache2_2.dll
.
EDIT: btw, when I use the installer, and it modifies httpd.conf for me, I still get the cannot find error during start up. wtf…
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
结果 LoadModule [...] 必须位于 httpd.conf 的最后。不知道为什么,但我移动了它,apache 不再抱怨了。
turns out the LoadModule […] has to go at the very end of httpd.conf. dunno why, but i moved it, and apache stopped complaining.