首页
下载
文档
社区
视频
捐赠
源代码
赞助商
AOT 编译器
AI 助理
商业产品
PHP AOT 原生编译器
Swoole-Compiler 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
swoole获取链接图片出现没有安装openssl
### 问题描述 今天使用getimagesize函数和file_get_contents函数打开图片链接报错 “必须配置‘——enable-openssl ’来支持ssl连接”。从新编译swoole加上--enanle-openssl也没有解决问题,查看php已安装的扩展有openssl,请求各位大佬帮忙解决一下 ### Swoole版本,PHP版本,以及操作系统版本信息 swoole使用的是4.4.17版本,php是7.4.4 ### 相关代码 ```php php代码 getimagesize('https://osscdn.suixingpay.com/0/2/32MDJhYjIyYWZOdk5kTTJheDIwMjBfMDZfMTdfMTZfMTBfNzQxZmMwZDM3MGVhNDhlOWE2OGY2MjQzNjIyYTZhNzgyYU9vcGVuQVBJX2J1Y2tldDJhYjE.jpg'); file_get_contents('https://osscdn.suixingpay.com/0/2/32MDJhYjIyYWZOdk5kTTJheDIwMjBfMDZfMTdfMTZfMTBfNzQxZmMwZDM3MGVhNDhlOWE2OGY2MjQzNjIyYTZhNzgyYU9vcGVuQVBJX2J1Y2tldDJhYjE.jpg'); 返回错误 PHP Warning: getimagesize(): you must configure with `--enable-openssl` to support ssl connection when compiling Swoole in /home/xiaohao/www/agent_ser/Zsmart/OpenSDK/Suipay/Picture.php on line 26 Warning: getimagesize(): you must configure with `--enable-openssl` to support ssl connection when compiling Swoole in /home/xiaohao/www/agent_ser/Zsmart/OpenSDK/Suipay/Picture.php on line 26 PHP Warning: getimagesize(https://zsmart001.oss-cn-chengdu.aliyuncs.com/LKS6PZAE3GZBLXWXEMJV8WR3A4MY0GAU.jpg): failed to open stream: operation failed in /home/xiaohao/www/agent_ser/Zsmart/OpenSDK/Suipay/Picture.php on line 26 Warning: getimagesize(https://zsmart001.oss-cn-chengdu.aliyuncs.com/LKS6PZAE3GZBLXWXEMJV8WR3A4MY0GAU.jpg): failed to open stream: operation failed in /home/xiaohao/www/agent_ser/Zsmart/OpenSDK/Suipay/Picture.php on line 26 ``` ### 你期待的结果是什么?实际看到的错误信息又是什么?
发布于6年前 · 17 次浏览 · 来自
提问
该死的IT男.
### 问题描述 今天使用getimagesize函数和file_get_contents函数打开图片链接报错 “必须配置‘——enable-openssl ’来支持ssl连接”。从新编译swoole加上--enanle-openssl也没有解决问题,查看php已安装的扩展有openssl,请求各位大佬帮忙解决一下 ### Swoole版本,PHP版本,以及操作系统版本信息 swoole使用的是4.4.17版本,php是7.4.4 ### 相关代码 ```php php代码 getimagesize('https://osscdn.suixingpay.com/0/2/32MDJhYjIyYWZOdk5kTTJheDIwMjBfMDZfMTdfMTZfMTBfNzQxZmMwZDM3MGVhNDhlOWE2OGY2MjQzNjIyYTZhNzgyYU9vcGVuQVBJX2J1Y2tldDJhYjE.jpg'); file_get_contents('https://osscdn.suixingpay.com/0/2/32MDJhYjIyYWZOdk5kTTJheDIwMjBfMDZfMTdfMTZfMTBfNzQxZmMwZDM3MGVhNDhlOWE2OGY2MjQzNjIyYTZhNzgyYU9vcGVuQVBJX2J1Y2tldDJhYjE.jpg'); 返回错误 PHP Warning: getimagesize(): you must configure with `--enable-openssl` to support ssl connection when compiling Swoole in /home/xiaohao/www/agent_ser/Zsmart/OpenSDK/Suipay/Picture.php on line 26 Warning: getimagesize(): you must configure with `--enable-openssl` to support ssl connection when compiling Swoole in /home/xiaohao/www/agent_ser/Zsmart/OpenSDK/Suipay/Picture.php on line 26 PHP Warning: getimagesize(https://zsmart001.oss-cn-chengdu.aliyuncs.com/LKS6PZAE3GZBLXWXEMJV8WR3A4MY0GAU.jpg): failed to open stream: operation failed in /home/xiaohao/www/agent_ser/Zsmart/OpenSDK/Suipay/Picture.php on line 26 Warning: getimagesize(https://zsmart001.oss-cn-chengdu.aliyuncs.com/LKS6PZAE3GZBLXWXEMJV8WR3A4MY0GAU.jpg): failed to open stream: operation failed in /home/xiaohao/www/agent_ser/Zsmart/OpenSDK/Suipay/Picture.php on line 26 ``` ### 你期待的结果是什么?实际看到的错误信息又是什么?
赞
0
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
登录
后参与评论
评论
2020-06-19
鲁飞
使用命令查看是否确实开启了openssl。 ```shell php --ri swoole | grep openssl ```
赞
0
回复
2020-06-19
该死的IT男.
回复
鲁飞
没有开启openssl,请问下要怎么操作
赞
0
回复
2020-06-19
该死的IT男.
回复
鲁飞
请问一下已经安装swoole了,怎么打开openssl呢
赞
0
回复
2020-06-19
鲁飞
回复
该死的IT男.
重新编译。
赞
0
回复