[英]C:/Apache24/conf/httpd.conf: Cannot load c:/php7/php7apache2.dll into server: The specified module could not be found
I am new apache and php.我是新的 apache 和 php。 I installed Apache server in C drive,
C:\\Apache24
.我在 C 盘安装了 Apache 服务器,
C:\\Apache24
。 then I installed the services in CMD using this command httpd -k install
.然后我使用这个命令
httpd -k install
在 CMD 中安装了服务。 then I go to Windows Service.然后我去Windows服务。 I can start and stop Apache2.4, it is working fine.
我可以启动和停止 Apache2.4,它工作正常。 I want to run php project.
我想运行php项目。 Now I installed php in
C:\\php7
.现在我在
C:\\php7
安装了 php。
PHP version: PHP版本:
PHP 7.3.0RC3 (cli) (built: Oct 10 2018 01:23:45) ( NTS MSVC15 (Visual C++ 2017) x64 ),
Copyright (c) 1997-2018, The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
Then I open Apache httpd.conf
file (C:/Apache24/conf/httpd.conf).然后我打开 Apache
httpd.conf
文件 (C:/Apache24/conf/httpd.conf)。
PHPIniDir "C:/php7"
AddHandler application/x-httpd-php .php
LoadModule php7_module "C:/php7/php7apache2_4.dll" [this is line no 550]
I added the above line in httpd.conf.我在 httpd.conf 中添加了上面的行。 Then start Apache with this command
httpd -k start
or another I can start it in Windows Services .然后使用此命令启动 Apache
httpd -k start
或另一个我可以在Windows Services 中启动它。
Thus, I am getting this error.因此,我收到此错误。 Why I do not know.
为什么我不知道。
C:\Apache24\bin>httpd -k start
httpd: Syntax error on line 550 of C:/Apache24/conf/httpd.conf: Cannot load c:/php7/php7apache2.dll into server: The specified module could not be found.
I figured it out myself.我自己想通了。 I installed thread safe version.
我安装了线程安全版本。 Please do not install non thread safe version.
请不要安装非线程安全版本。
The thread safe version is VC15 x64 Thread Safe (2018-Oct-10 19:19:47)线程安全版本是 VC15 x64 线程安全 (2018-Oct-10 19:19:47)
I added this line in Apache httpd.conf file.我在 Apache httpd.conf文件中添加了这一行。
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php7_module "c:/php730rc3/php7apache2_4.dll"
PHPIniDir "c:/php730rc3"
I got this error too, after confirming this module exist in /modules/, I checked the httpd.conf and found that the SRVROOT was wrong.我也收到这个错误,在确认/modules/中存在这个模块后,我检查了httpd.conf,发现SRVROOT是错误的。
Define SRVROOT "D:/Project/Apache24/bin" //wrong
Define SRVROOT "D:/Project/Apache24" //correct
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.