【问题标题】:Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect to ssl://api.twitter.com:443Zend_Http_Client_Adapter_Exception' 带有消息'无法连接到 ssl://api.twitter.com:443
【发布时间】:2013-09-16 15:55:21
【问题描述】:

我正在尝试在我的 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,所以这不是代理问题..

【问题讨论】:

  • 啊,是的,“无法找到套接字传输'ssl'”是这里的关键。这意味着未启用 openssl 扩展。您使用的是 Windows、Mac 还是 Linux?

标签: php zend-framework ssl twitter


【解决方案1】:

我按照启用 OpenSSL 的说明进行操作,这修复了错误!

【讨论】:

    猜你喜欢
    • 2019-12-15
    • 2016-11-25
    • 2015-10-25
    • 2017-03-08
    • 2020-11-30
    • 2020-07-28
    • 2014-08-08
    • 2015-06-02
    • 1970-01-01
    相关资源
    最近更新 更多