首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PHP不允许https连接

问PHP不允许https连接
EN

Server Fault用户
提问于 2012-10-29 17:43:12
回答 3查看 1.3K关注 0票数 0

嘿,伙计们,我正在运行PHP5.4.0,我不能使用cURL或files_get_content() https连接。

在PHP脚本中使用curl显示:

代码语言:javascript
复制
[root@ns1]# /opt/php/bin/php -q test.php
* About to connect() to www.google.com port 443
*  Trying 74.125.225.210... * connected
* Connected to www.google.com (74.125.225.210) port 443
* successfully set certificate verify locations:
*  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
Segmentation fault

使用file_get_contents()显示:

代码语言:javascript
复制
Warning: file_get_contents(): Unable to find the wrapper "https" - did
you forget to enable it when you configured PHP? in /test.php

OpenSSL和OpenSSL已经安装,并且还配置了对SSL连接的cURL支持。请参阅:http://i.imgur.com/ExAIf.png

知道可能出了什么问题吗?

更多信息: CentOS 5.8(64)和Nginx1.2.4

EN

回答 3

Server Fault用户

回答已采纳

发布于 2012-10-31 09:21:13

通过升级到5.4.8解决了这个问题。

票数 0
EN

Server Fault用户

发布于 2012-10-31 18:33:30

您可能想尝试使用--带有-openssl(您的其他要求)从源代码编译PHP。它将保证Curl和PHP说的是相同的版本。

票数 0
EN

Server Fault用户

发布于 2012-11-28 19:48:14

升级到5.4.9是为我做的。很明显有一个5.4.4的bug。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/443446

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档