当前位置: 首页 > 知识库问答 >
问题:

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

越雨泽
2023-03-14

我试图在Windows 10上为我的XAMPP Apache更新PHP7.3到PHP7.4。现在Apache不会启动。。。

我正在使用自签名安全证书进行开发。

我从Apache收到的错误消息是:

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

以下是最新的错误日志条目:

[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

  1. 从下载线程安全PHP版本http://windows.php.net
LoadFile "D:/xampp/php/php7ts.dll"
LoadFile "D:/xampp/php/libpq.dll"
LoadModule php7_module "D:/xampp/php/php7apache2_4.dll"

我不知道该怎么办,担心我会把它弄得更糟...非常感谢帮助!我真的需要Apache工作...

编辑:

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

[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命令的结果:

"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行是:

# XAMPP settings
Include "conf/extra/httpd-xampp.conf"

http-xampp.conf第17行是:

LoadFile "D:/xampp/php/php7ts.dll"

进一步的研究让我想到了这个关于php7ts.dll的问题:php7ts.dll无法加载到服务器中

所以我运行了命令httpd。exe-v和php。exe-v。结果是它们都是64位版本,我认为:

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

共有2个答案

翟黎明
2023-03-14

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

>

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

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

  • 澹台华晖
    2023-03-14

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

     类似资料:
    • 我当时使用的是Android Studio 3.0.1。今天,我已经将IDE更新为3.1(32位)。完全更新后,Android Studio没有启动。 ----------P R O C E S S----------------- Java线程:(=>当前线程)=>0x05E77000 JavaThread“awt-windows”守护进程[_thread_in_native,ID=10244,

    • E:未能获取http://cdn-fastly.deb.debian.org/debian/pool/main/r/readline/readline-common_7.0-5_all.deb无法解析'cdn-fastly.deb.debian.org'E:未能获取http://cdn-fastly.deb.debian.org/debian/j/jquery/libjs-jquery_3.3.1

    • 我经常使用某个jar文件来显示文本文件并允许您以不同的方式过滤列表。 在我从Java 7升级到Java 10之前,这一切都非常有效。现在它将不再显示资源文本文件。 下面是我获取jar文件的位置:https://github.com/dragan224/battle_cats_en_combos jar文件的根目录中有两个。jar在其内部使用的txt文件。是否存在阻止此操作的安全设置?还是版本更改导

    • JAXB配置因将集合从JDK 1.7升级到JDK 1.8u05而中断 解组jaxB不起作用,对象为空 用JAXB解组不起作用

    • 我从Spring Boot 1.5更新到2。和其他一些一样,我还面临这样一个问题,即通过进行更新,Flyway也从3更新到5。Flyway更新的问题是flyway模式表不会自动迁移,因此数据库迁移不起作用。 《Spring Boot迁移指南》建议先更新到Flyway 4,然后再更新到Spring Boot 2。我按照建议做了,包括 进入我的POM。Flyway表示,只需运行应用程序即可应用从版本3