Created 常见问题

0x012FA733 2020-03-16 23:49:00 +08:00
parent bb465c4284
commit c5b691fecc

111
常见问题.md Normal file

@ -0,0 +1,111 @@
## 程序运行相关
---
### 1. cURL error 60: SSL certificate problem
#### 错误
程序启动时出现错误如下,
```
[202X-XX-XX XX:XX:XX] Log.WARNING CURl -> RETRY: 0 ERROR: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) ERRNO: 0
[2020-XX-XX XX:XX:XX] Log.WARNING 尝试重试第 0 次,等待网络恢复...
[2020-XX-XX XX:XX:XX] Log.WARNING CURl -> RETRY: 1 ERROR: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) ERRNO: 0
[2020-XX-XX XX:XX:XX] Log.WARNING 尝试重试第 1 次,等待网络恢复...
```
#### 原因
参见 https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html#verify
#### 解决
如下所示,修改配置文件 `user.conf``VERIFY_SSL` 参数为 `false`
```
# 验证SSL证书|请求时验证SSL证书行为
VERIFY_SSL=false
```
---
### 2. Fail to parse dotenv file due to invalid name
#### 错误
```
PHP Fatal error: Uncaught Dotenv\Exception\InvalidFileException: Failed to parse dotenv file due to invalid name. Failed at [#######################]. in .../vendor/vlucas/phpdotenv/src/Loader/Parser.php:77
```
#### 原因
配置文件 `user.conf` 中含有不能处理的参数
#### 解决
请检查配置文件 `user.conf` 是否有输入错误的地方Windows 建议使用 [Notepad++](https://notepad-plus-plus.org/downloads/) 重新编辑保存配置文件
---
### 3. pcntl_signal_dispatch() has been disabled for security reasons
#### 错误
```
Warning: pcntl_signal_dispatch() has been disabled for security reasons in .../vendor/amphp/amp/lib/loop/NativeDriver.php on line 141
PHP Warning: pcntl_signal_dispatch() has been disabled for security reasons in .../vendor/amphp/amp/lib/loop/NativeDriver.php on line 141
```
#### 原因
基于安全理由 `pcntl_signal_dispatch()` 在 PHP 配置文件中被禁用
#### 解决
找到 PHP 的配置文件 `php.ini`(通常位于 PHP 的安装目录下),搜索 `disable_functions``pcntl_signal_dispatch`,然后把 `disable_functions` 等号后面的 `pcntl_signal_dispatch,` 删掉,或者在 `disable_functions` 前面加上 `;`(英文分号)
---
### 4.
#### 错误
#### 原因
#### 解决
---
---
## Windows 相关
---
### 1. 'vcruntime140.dll' 14.0 is not compatible
#### 错误
```
PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0
```
#### 原因
最新版本的 PHP 使用 VC15 或 VS16分别使用 Visual Studio 2015、2017 或 2019 编译器)构建,并在性能和稳定性方面进行了改进
#### 解决
使用这些版本的 PHP 需要安装 Visual Studio 2015-2019 x64 或 x86 的 Visual C++ Redistributable 组件
下载地址:[64位版本](https://aka.ms/vs/16/release/VC_redist.x64.exe)[32位版本](https://aka.ms/vs/16/release/VC_redist.x86.exe)
---
### 2.
#### 错误
#### 原因
#### 解决