Tools
首页
画图
音乐
采集
记事
博客
实验室
登录
lypeng
146
文章
11
分类
46
记事
分类
生活-[23]
Linux-[24]
前端-[9]
数据库-[16]
PHP-[31]
git-[7]
其他-[6]
python-[20]
算法-[4]
React-Native-[4]
中草药-[2]
广告位1
广告位2
首页
/ PHP
返回列表
安装了PHP7.4结果nginx报404
阅读:336
发布:2020-12-17
作者:
php8都出来了,我还在用php7.2; 最近打算升级下版本,安装了PHP7.4.13,结果nginx报404 查看nginx日志:D:\phpStudy\nginx\logs\error.log ``` 2020/12/17 17:22:36 [error] 7716#2440: *1 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1" ``` 上游积极拒绝,连接失败!那肯定是PHP的问题! 可是PHP没有个错误日志,phpstudy启动也正常,怎么办? 解决办法: 用命令行打开,直接看错误信息,即输入`php -v` 看报错信息; 1. 修改环境变量 2. `php -v` 3. 报错如下: ``` PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unk nown on line 0 ``` 知道原因了,vc库的问题,与PHP版本不兼容 下载最新的VC库,https://support.microsoft.com/zh-cn/help/2977003/the-latest-supported-visual-c-downloads?_blank Visual Studio 2015、2017 和 2019 VC库变成公用的了。 下载,安装,重新执行`php -v`,OK了 ``` $ php -v PHP 7.4.13 (cli) (built: Nov 24 2020 12:45:27) ( NTS Visual C++ 2017 x86 ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies ``` 恢复正常~
------本文结束
感谢阅读------
上一篇:
文字转语音
下一篇:没有了