AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 443446
Accepted
Mr.Boon
Mr.Boon
Asked: 2012-10-30 09:43:12 +0800 CST2012-10-30 09:43:12 +0800 CST 2012-10-30 09:43:12 +0800 CST

PHP 不允许 https 连接

  • 772

大家好,我正在运行 PHP 5.4.0,但我无法使用 cURL 或 files_get_content() https 连接。

在 PHP 脚本中使用 curl 显示:

[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() 显示:

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-devel,PHP 还配置了对 SSL 连接的 cURL 支持。请参阅:http: //i.imgur.com/ExAIf.png

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

更多信息:CentOS 5.8(64) 与 Nginx 1.2.4

php
  • 3 3 个回答
  • 1223 Views

3 个回答

  • Voted
  1. Best Answer
    Mr.Boon
    2012-11-01T01:21:13+08:002012-11-01T01:21:13+08:00

    通过升级到 5.4.8 解决了它。

    • 0
  2. gmck
    2012-11-01T10:33:30+08:002012-11-01T10:33:30+08:00

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

    • 0
  3. PHP User
    2012-11-29T11:48:14+08:002012-11-29T11:48:14+08:00

    升级到 5.4.9 对我有用。5.4.4 显然有一个错误。

    • 0

相关问题

  • 用户特定的 Php.ini 当 php 作为模块运行时?

  • 使 php mail() 函数在 ubuntu-server 上工作的步骤是什么?

  • Web 服务器和数据库服务器位于完全不同的位置

  • PHP 作为 CGI 还是 Apache 模块?

  • 通过 VPN 连接什么是远程服务器 IP?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve