-
-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
编译后使用curl函数时会报错 #24
Comments
@TNT-ma 运行时需要指定 PHP.ini 里面 curl 的证书 证书这里下载:https://curl.haxx.se/docs/caextract.html wget https://curl.se/ca/cacert.pem
办法一: 更改 php.ini设置 ini_set('curl.cainfo',__DIR__.'/cacert.pem') ;
ini_get('curl.cainfo') 办法二: 运行程序时指定
my-custom-curl.ini 配置内容如下:
运行程序是指定配置 php -c my-custom-curl.ini app.phar |
@jingjingxyk 全都试了,不起作用,还是报错 |
使用软连接这种方式了吗? : 大佬给的办法swoole/swoole-cli#88 |
|
这个问题老版本的时候就一直存在,而且我也提过
|
我感觉这个可以通过 patch php-curl 的源码来实现。 |
现在可以通过在编译时植入硬编码的 php ini 选项进行绑定系统的 cacert 文件了,且 macOS 系统下默认绑定了系统路径的证书。 |
报错内容:cURL error 77: error setting certificate verify
项目使用了一个定时自动curl请求第三方地址
正常PHP环境运行 没问题
打包phar后运行·也没有问题
当和php二进制文件组合后报错
The text was updated successfully, but these errors were encountered: