libcurl 中不支持或禁用协议 https [英] Protocol https not supported or disabled in libcurl
问题描述
我在我的应用程序中使用 Authorize.net(在 OSCOMMERCE 中),当用户付款时返回空响应.我调试后发现它返回了这个错误:
I am using Authorize.net in my application(its in OSCOMMERCE) , When the user making payment its returning empty response. I debugged and find that it returning this error:
libcurl 中不支持或禁用协议 https
Protocol https not supported or disabled in libcurl
我正在发送一个以 https 开头的探测器 url,里面没有空格https://secure.authorize.net/gateway/transact.dll
I am sending a prober url starts with https there is no space in that https://secure.authorize.net/gateway/transact.dll
我在共享托管服务器中的应用程序.我怀疑这是服务器端问题还是编程问题?
My application in shared hosting server. My doubt is this is server side problem or Programming problem ?
推荐答案
创建一个名为 info.php 的脚本,并在其中放入 <?php phpinfo();?>
.将其保存在您网站上的某个位置,以便您可以从浏览器访问它.
Create a script called info.php and in it put <?php phpinfo(); ?>
. Save it somewhere on your site so you can access it from a browser.
找到 curl 部分并检查支持哪些协议.如果 https
未列出,则 cURL 没有使用 SSL 支持构建,您不能使用 https.
Find the curl section and check what Protocols are supported. If https
is not listed, then cURL was not built with SSL support and you cannot use https.
您还可以查看 Registered PHP Streams
的第一部分,看看是否列出了 https
.如果是这样,那么您可以回退到使用 PHP 的套接字函数或函数,例如 file_get_contents()
或 fopen
和 上下文.
You can also look in the very first section for Registered PHP Streams
and see if https
is listed. If so, then you can fallback to use PHP's socket functions or functions such as file_get_contents()
or fopen
with a context.
既然您提到您在共享主机上,请请求您的主机重新编译 PHP,以便 PHP 和 curl 都使用 OpenSSL 支持构建,以便您可以使用加密,否则您将需要寻找其他解决方案.
Since you mention you are on a shared host, request that your host recompile PHP so that both PHP and curl are built with OpenSSL support so you can use encryption, otherwise you will need to find another solution.
这篇关于libcurl 中不支持或禁用协议 https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!