Php Zend#u Http#u Client#u Adapter#u Exception';带有消息';无法连接到ssl://api.twitter.com:443
我正在尝试在我的Zend应用程序的主页上显示twitter提要,到目前为止,我有我的IndexController代码:Php Zend#u Http#u Client#u Adapter#u Exception';带有消息';无法连接到ssl://api.twitter.com:443,php,zend-framework,ssl,twitter,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' => 'tokSe
// ---------------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的说明进行了操作,修复了错误 啊,是的,“找不到套接字传输‘ssl’”是这里的关键位。这意味着未启用openssl扩展。您使用的是Windows、Mac还是Linux?