php 在 Windows 10 上安装 PHP7 和 Apache2.4 - php7apache2_4.dll 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36484775/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 00:49:51  来源:igfitidea点击:

Installing PHP7 and Apache2.4 - php7apache2_4.dll error on Windows 10

phpwindowsapache

提问by Storm Parker

Just got on a Windows 10 and after I configured my php.ini and http.conf I went on the command line httpd.exeand got this error message:

刚刚在 Windows 10 上配置好 php.ini 和 http.conf 后,我进入命令行httpd.exe并收到以下错误消息:

httpd.exe: Syntax error on line 530 of C:/Apache/conf/httpd.conf: Cannot load C:/php/php7apache2_4.dll into server: The specified module could not be found.

I KNOW this file is in that folder. I've installed both 64 bits version of PHP and Apache and I don't know what's going on.

我知道这个文件在那个文件夹中。我已经安装了 64 位版本的 PHP 和 Apache,但我不知道发生了什么。

回答by Kumar

Check whether you have installed Thread safe version of PHP. Non Thread safe version will cause this error.

检查您是否安装了线程安全版本的 PHP。非线程安全版本将导致此错误。

You can download thread safe version of PHP here

您可以在此处下载线程安全版本的 PHP

回答by Atheek

while you downloading PHP u should select ThreadSafe pack, Apache not supporting nonThreadSafe...

当您下载 PHP 时,您应该选择 ThreadSafe 包,Apache 不支持 nonThreadSafe...

回答by Kagome

Which VC compiled version of Apache do you use? On php.netthey recommend to use the apache server from apachelounge.comcombined with the threadsafe php files.
Also make sure that you have installed the C++ Redistributable Visual Studio 2015.
If it still fails with that error make sure the user who is starting the process has access to the filesystem.

您使用哪个 VC 编译版本的 Apache?在php.net 上,他们建议使用来自apachelounge.com的 apache 服务器以及线程安全的 php 文件。
还要确保您已经安装了 C++ Redistributable Visual Studio 2015。
如果它仍然失败并出现该错误,请确保启动该进程的用户可以访问文件系统。