我有 Zend Framework 1.12 项目,还有 PHP 5.5.3 和 nginx 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上运行良好,请问是什么原因导致的错误?
最佳答案
我的错误是我轻率地复制粘贴了来自 here 的 cofigure
命令脚本.
我用 --with-openssl
而不是 --with-openssl-dir=/usr
重新编译了 PHP,现在它运行良好。
关于php - Zend_Http_Client SSL 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18661980/