php - Zend_Http_Client_Adapter_Exception' 消息'无法连接到 ssl ://api. twitter.com:443

标签 php zend-framework ssl twitter

我正在尝试在我的 Zend 应用程序的主页上显示一个 Twitter 提要,到目前为止我有我的 IndexController 代码:

// ---------------Twitter Feed
        $token = new Zend_Oauth_Token_Access();
    $token->setParams(array(
        'oauth_token' => 'token',
        'oauth_token_secret' => 'tokSecret',
    ));

    $twitter = new Zend_Service_Twitter(array(
        'username' => 'usrname',
        'accessToken' => $token,
        'oauthOptions' => array(
            'consumerKey' => 'consKey',
            'consumerSecret' => 'consSecret',
        )
    ));

    $options = array('accessToken' => $token);




    $this->view->twitter_timeline = $twitter->statuses->userTimeline();

这是给我的错误:

exception 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect to ssl://api.twitter.com:443. Error #-223657718: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?'

我可以通过浏览器连接到 api.twitter.com,所以这不是代理问题..

最佳答案

我按照说明启用 OpenSSL,这修复了错误!

关于php - Zend_Http_Client_Adapter_Exception' 消息'无法连接到 ssl ://api. twitter.com:443,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18761277/

相关文章:

android - Charles Proxy 不适用于 7.0 以上的 Android 版本?

sql-server - [ODBC SQL Server 驱动程序][DBMSLPCN]SSL 安全错误

php - WordPress 搜索查询帖子

php - Zend Lucene 正在处理中……我的网站崩溃了

mysql - 使用 Zend 使用不同但两个字段从数据库中选择记录

php - 如何使用 Zend_Locale 快速获取 PHP 本地化序号

node.js - Bluemix 应用程序上自定义域的 SSL 证书传播问题

php - 在所有表中搜索字符串并使用分页技术显示它

php - 我们可以在 php 类的一个方法中使用两个 mysql 查询吗?

php - 将 PHP 中的 MYSQL 调用格式化为 TRIM