重装系统后XAMPP启动APACHE报错解决方法

重装系统后,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正常运行。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
Apache2.4 Win64位 配置PHP: #----------------Fastcgi-------------------------------- LoadModule fcgid_module modules/mod_fcgid.so <IfModule mod_fcgid.c> FcgidMaxRequestsPerProcess 1000 FcgidMaxProcesses 15 FcgidIOTimeout 600 FcgidIdleTimeout 600 MaxRequestLen 104857600 </IfModule> #------------------------------------------------------- AddType text/html .php #fastcgi环境配置 <IfModule mod_fcgid.c> AddHandler fcgid-script .php FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000 FcgidInitialEnv PHPRC "F:/web/server/PHP" FcgidInitialEnv OPENSSL_CONF "F:/web/server/PHP/extras/openssl.cnf" FcgidWrapper "F:/web/server/PHP/php-cgi.exe" .php </IfModule> 备注: apache No input filespecified,今天是我们配置apache RewriteRule时出现这种问题,解决办法很简单如下 打开.htaccess 在RewriteRule 后面的index.php教程后面添加一个“?” 完整代码如下 .htaccess RewriteEngine on RewriteCond $1 !^(index.php|images|robots.txt) RewriteRule ^(.*)$ /index.php?/$1 [L] 如果是apache服务器出问题,看看是不是的Apache 把 .php 后缀的文件解析哪里有问题了。 Apache 将哪些后缀作为 PHP 解析。例如,让 Apache 把 .php 后缀的文件解析为PHP。可以将任何后缀的文件解析为 PHP,只要在以下语句中加入并用空格分开。这里以添加一个 .phtml 来示例。 AddType application/x-httpd-php .php .phtml 为了将 .phps教程作为 PHP 的源文件进行语法高亮显示,还可以加上: AddType application/x-httpd-php-source .phps 用通常的过程启动 Apache(必须完全停止 Apache 再重新启动,而不是用 HUP 或者USR1 信号使 Apache 重新加载)。 调试: httpd.exe -w -n "Apache2.4" -k start (引号中为你的apache服务名) module: http://www.apachelounge.com/download/

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值