首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Windows 10,XAMPP Apache不会在PHP从7.3更新到7.4之后启动

Windows 10,XAMPP Apache不会在PHP从7.3更新到7.4之后启动
EN

Stack Overflow用户
提问于 2020-06-18 08:50:20
回答 2查看 4.6K关注 0票数 2

我试图将PHP7.3更新为PHP7.4,以获取PHP7.4 on Windows 10上的XAMPP Apache。现在Apache不能开始..。

我正在使用一个自我签署的安全证书进行开发。

我从Apache获得的错误消息是:

代码语言:javascript
运行
复制
10:30:53 AM  [Apache]   Attempting to start Apache app...
10:30:53 AM  [Apache]   Status change detected: running
10:30:54 AM  [Apache]   Status change detected: stopped
10:30:54 AM  [Apache]   Error: Apache shutdown unexpectedly.
10:30:54 AM  [Apache]   This may be due to a blocked port, missing dependencies, 
10:30:54 AM  [Apache]   improper privileges, a crash, or a shutdown by another method.
10:30:54 AM  [Apache]   Press the Logs button to view error logs and check
10:30:54 AM  [Apache]   the Windows Event Viewer for more clues
10:30:54 AM  [Apache]   If you need more help, copy and post this
10:30:54 AM  [Apache]   entire log window on the forums

这些是最新的错误日志条目:

代码语言:javascript
运行
复制
[Thu Jun 18 09:50:08.253500 2020] [ssl:warn] [pid 3120:tid 520] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 18 09:50:08.253500 2020] [ssl:warn] [pid 3120:tid 520] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 18 09:50:08.278953 2020] [mpm_winnt:notice] [pid 3120:tid 520] AH00354: Child: Starting 150 worker threads.

我遵循了本教程: https://medium.com/oceanize-geeks/how-to-upgrade-lower-version-to-latest-php-version-in-xampp-on-windows-f7be9a70bbb0

http://windows.php.net

  • unzip,重命名文件夹下载线程安全php版本到XAMPP中的PHP

  • 重命名php文件夹(所以我现在是php_7.3)

  • insert新php folder

  • inside --这个新的PHP文件夹,我将php.ini.development重命名为php.ini

  • ,然后替换了httpd-xamp.conf中的PHP模块行如下:

)

代码语言:javascript
运行
复制
LoadFile "D:/xampp/php/php7ts.dll"
LoadFile "D:/xampp/php/libpq.dll"
LoadModule php7_module "D:/xampp/php/php7apache2_4.dll"

我不知道该怎么办,担心我会把事情搞砸.我们非常感谢你的帮助!我真的需要阿帕奇来工作..。

编辑:

以下是今天的完整错误日志:

代码语言:javascript
运行
复制
[Thu Jun 18 09:50:07.558720 2020] [ssl:warn] [pid 17248:tid 512] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 18 09:50:07.559723 2020] [ssl:warn] [pid 17248:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 18 09:50:07.611001 2020] [core:warn] [pid 17248:tid 512] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jun 18 09:50:07.613027 2020] [ssl:warn] [pid 17248:tid 512] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 18 09:50:07.613027 2020] [ssl:warn] [pid 17248:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 18 09:50:07.648936 2020] [mpm_winnt:notice] [pid 17248:tid 512] AH00455: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.11 configured -- resuming normal operations
[Thu Jun 18 09:50:07.648936 2020] [mpm_winnt:notice] [pid 17248:tid 512] AH00456: Apache Lounge VC15 Server built: Aug 11 2019 12:20:04
[Thu Jun 18 09:50:07.648936 2020] [core:notice] [pid 17248:tid 512] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Jun 18 09:50:07.655110 2020] [mpm_winnt:notice] [pid 17248:tid 512] AH00418: Parent: Created child process 3120
[Thu Jun 18 09:50:08.205628 2020] [ssl:warn] [pid 3120:tid 520] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 18 09:50:08.206625 2020] [ssl:warn] [pid 3120:tid 520] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 18 09:50:08.253500 2020] [ssl:warn] [pid 3120:tid 520] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 18 09:50:08.253500 2020] [ssl:warn] [pid 3120:tid 520] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 18 09:50:08.278953 2020] [mpm_winnt:notice] [pid 3120:tid 520] AH00354: Child: Starting 150 worker threads.

编辑2:

通过Windows命令提示符运行httpd.exehttpd.exe -t命令的结果:

代码语言:javascript
运行
复制
"httpd.exe: Syntax error on line 537 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 17 of C:/xampp/apache/conf/extra/httpd-xampp.conf: Cannot load D:/xampp/php/php7ts.dll into server: The specified module could not be found."

httpd.conf中的第537行是:

代码语言:javascript
运行
复制
# XAMPP settings
Include "conf/extra/httpd-xampp.conf"

http-xampp.conf中的第17行是:

代码语言:javascript
运行
复制
LoadFile "D:/xampp/php/php7ts.dll"

进一步的研究使我想到了关于php7ts.dllphp7ts.dll cannot load into server的问题。

所以我运行了命令httpd.exe -vphp.exe -v。结果是,它们都是64位版本,我想:

代码语言:javascript
运行
复制
C:\xampp\apache\bin>httpd.exe -v
Server version: Apache/2.4.41 (Win64)
Apache Lounge VC15 Server built:   Aug 11 2019 12:20:04

C:\xampp\apache\bin>php.exe -v
PHP 7.4.7 (cli) (built: Jun  9 2020 13:36:15) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-06-18 09:17:55

确认确认的php7ts.dll文件位置,并在apache配置文件中使用相同的位置。

票数 1
EN

Stack Overflow用户

发布于 2022-06-01 08:28:26

您可以检查apache的设置是否正确:

打开命令提示符并导航到apache文件夹:cd C:/xampp/apache/bin

然后运行以下命令,查看语法是否正常:httpd.exe -t

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62446034

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档