php - Zend_Http_Client SSL 异常

标签 php zend-framework ssl nginx zend-http-client

我有 Zend Framework 1.12 项目,还有 PHP 5.5.3nginx 1.2.7 + php-fpm 安装在 Ubuntu 10.04 服务器上。

我收到以下异常

消息:无法连接到 ssl://pftradingnet.com:443。错误 #179898264:无法找到套接字传输“ssl”——您是否在配置 PHP 时忘记启用它?

来自 Zend_Http_Client_Adapter_Socket->connect 函数。

我的配置命令是

'./configure' '--enable-opcache' '--prefix=/opt/php' '--with-apxs2=/usr/bin/apxs2' '--with-mysql=mysqlnd ' '--with-mysqli=mysqlnd' '--with-pgsql=/usr' '--with-tidy=/usr' '--with-curl=/usr/bin' '--with-openssl-dir =/usr' '--with-zlib-dir=/usr' '--with-xpm-dir=/usr' '--with-pdo-pgsql=/usr' '--with-pdo-mysql=mysqlnd ' '--with-xsl=/usr' '--with-ldap' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-snmp=/usr' '-- enable-exif' '--enable-calendar' '--with-bz2=/usr' '--with-mcrypt=/usr' '--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-freetype-dir=/usr' '--enable-mbstring' '--enable-zip' '--with-pear' '--with- libdir=lib' '--with-config-file-path=/opt' '--enable-fpm' '--with-fpm-user=fpm' '--with-fpm-group=fpm' '--启用调试'

之前在php5.3+Apache2上运行良好,请问是什么原因导致的错误?

最佳答案

我的错误是我轻率地复制粘贴了来自 herecofigure 命令脚本.

我用 --with-openssl 而不是 --with-openssl-dir=/usr 重新编译了 PHP,现在它运行良好。

关于php - Zend_Http_Client SSL 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18661980/

相关文章:

php - 了解并修复在 https 和 http 之间丢失的 php session

php - 如何在 PHP 中通过 PDO 循环遍历 MySQL 查询?

php - 在 Zend Framework 中强制 HTTP 到 HTTPS 重定向

php - 如何在 zend 框架 Controller 中包含文件?

php - Zend 1 - SQL FROM 表达式别名

java - 使用 SSL 加密和 NTLM 身份验证的 HttpClient 失败

.net - 尝试使用 Fiddler 从 SSL Web 服务调用中获取 XML?

java - SMTP STARTTLS : how to behave if remote SMTP server has self-signed certificate?

php - Docker 开发环境中 Localhost 连接被拒绝

php - iOS与mysql数据库连接的安全性