From c5b691feccbb58fc71b23ed2bd2fa8183664d00d Mon Sep 17 00:00:00 2001 From: 0x012FA733 <49284128+0x012FA733@users.noreply.github.com> Date: Mon, 16 Mar 2020 23:49:00 +0800 Subject: [PATCH] =?UTF-8?q?Created=20=E5=B8=B8=E8=A7=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 常见问题.md | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 常见问题.md diff --git a/常见问题.md b/常见问题.md new file mode 100644 index 0000000..1d85cdf --- /dev/null +++ b/常见问题.md @@ -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. + +#### 错误 + +#### 原因 + +#### 解决