cURL 脚本在从一台服务器运行时有效,但在另一台服务器上运行则无效
我最近将 cURL 脚本从一台服务器 (Ubuntu) 移动到另一台服务器 (Mac OS X)。该脚本在从 Ubuntu 服务器运行时有效,但在 OS X 服务器上无效。我收到错误 35:
error:14077417:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert illegal parameter
有什么想法吗?
编辑:这可能是一个非常好的线索。这行不通:
curl -v https://foo.com/OA_HTML/RF.jsp?function_id=123
但这行得通:
curl -v -sslv3 https://foo.com/OA_HTML/RF.jsp?function_id=123
现在我只需要知道如何在 PHP 中执行与第二个命令相同的操作。
I recently moved a cURL script from one server (Ubuntu) to another (Mac OS X). The script worked when run from the Ubuntu server but it doesn't work on the OS X server. I get error 35 and this:
error:14077417:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert illegal parameter
Any ideas?
Edit: Here's what's probably a really good clue. This doesn't work:
curl -v https://foo.com/OA_HTML/RF.jsp?function_id=123
But this does:
curl -v -sslv3 https://foo.com/OA_HTML/RF.jsp?function_id=123
Now I just need to know how to do the equivalent of the second command from within PHP.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
可能是一些 php.ini 设置或 apache follow 或 openbasedir 设置!
Could be some php.ini setting or apache follow or openbasedir setting !
我知道我迟到了,但
相当于
I know I'm late but the equivalent of
is
大多数时候,CURL over SSL 使用 OpenSSL,新服务器上很可能没有安装或启用 CURL 或 OpenSSL。使用以下命令在服务器上保存文件:
并检查这些是否已启用
ADD
或者您的 SSL 证书未在您尝试使用它们的计算机上创建。每个 SSL 证书都包含有关每台计算机的特定信息(如果从在线供应商收到)
Most of the time CURL over SSL uses OpenSSL, more than likely either CURL or OpenSSL is not installed or enabled on the new server. Save a file on the server with:
and check if these are enabled
ADD
Either that or your SSL Certificates where not created on the machine you are trying to use them on. Each SSL certificate has specific information about each machine (if received from an online vendor)