重装系统后,XAMPP启动APACHE服务一直报错,启动MYSQL组件就正常:
[ssl:warn] [pid 11740:tid 244] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[ssl:warn] [pid 11740:tid 244] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[mpm_winnt:notice] [pid 11740:tid 244] AH00455: Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/8.0.2 configured -- resuming normal operations
[mpm_winnt:notice] [pid 11740:tid 244] AH00456: Apache Lounge VS16 Server built: Oct 2 2020 11:45:39
[core:notice] [pid 11740:tid 244] AH00094: Command line: 'E:\\xampp\\apache\\bin\\httpd.exe -d E:/xampp/apache'
[mpm_winnt:notice] [pid 11740:tid 244] AH00418: Parent: Created child process 22356
运行XAMPP下面的test_php.bat,一直提示错误,按照提示装了C++ 2017的运行库之后,依然出错:
echo [XAMPP]: FIRST TEST - Searching for an installed Microsoft Visual C++ 2017 runtime package in the registry ...
set runtime17_a=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64
reg query "%runtime15_a%" /v Version
if %ERRORLEVEL% EQU 0 (
goto runtime_success
)
echo:
echo [WARNING]: Microsoft C++ 2017 runtime libraries not found !!!
echo [WARNING]: Possibly PHP cannot execute without these runtime libraries
echo [WARNING]: Please install the MS VC++ 2017 Redistributable Package from the Mircrosoft page
echo [WARNING]: https://www.microsoft.com/en-us/download/details.aspx?id=48145
goto runtime_end
提示:
'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0
将SYSTEM32的该DLL文件复制到XAMPP目录下面,依然报错,最后安装了WIN10系统下的C++ 2019运行库,XAMPP就正常使用了。
地址:https://visualstudio.microsoft.com/zh-hans/downloads/
往下拖动,找到“其他工具和框架”
运行下图的
安装后,XAMPP正常运行。