php curl采集被拒绝,cloudinary&# 39 PHP上传API中的cURL错误—未能连接到端口443:连接被拒绝。...

本文介绍了一位开发者使用Cloudinary PHP API从服务器上传图片到Cloudinary存储时遇到的问题:在本地环境中一切正常,但部署到具有HTTPS的互联网服务器上后出现连接被拒绝的错误。文章探讨了可能的原因及寻求解决方案的过程。

I use Cloudinary’s PHP API to upload images from my server to Cloudinary storage. The code snippet I use is:

$imguploadres = \Cloudinary\Uploader::upload([URL HERE], [ARRAY OF OPTIONS]);

This snippet works like a charm in my localhost (XAMPP) which is HTTP. But when I uploaded this code to my server on the Internet having HTTPS, it started outputting this error: “failed to connect to port 443: connection refused”.

I have searched for the solution on the Internet for some hours now, but to no avail. Most solutions involved enabling the “HTTP on Outgoing connections” setting through the hosting panel, but unfortunately I have no access to it.

For some info to help you, I use Biz.nf free hosting, but my domain is paid (.COM) from GoDaddy. I also use Cloudflare’s shared SSL and other features. The PHP script that contains the above snippet is called using JS AJAX.

Thanks in advance. Ask any questions as comments and I’ll try my best to answer them.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值