marchesesimone / oauth-php

Automatically exported from code.google.com/p/oauth-php
MIT License
0 stars 0 forks source link

SSL causes Fatal error: Uncaught exception 'OAuthException2' with message 'No answer from the server #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.use https://twitter.com/oauth/request_token/ for request_token_uri
2.try to use OAuthRequester::requestRequestToken
3.

What is the expected output? What do you see instead?
Fatal error: Uncaught exception 'OAuthException2' with message 'No answer 
from the server "https://twitter.com/oauth/request_token/" while requesting 
a request token' 

What version of the product are you using? On what operating system?

Please provide any additional information below.
Curl ssl options are not set , could be quick fixed by adding 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

Original issue reported on code.google.com by MRuba...@gmail.com on 25 May 2010 at 9:26

GoogleCodeExporter commented 9 years ago
It's not the prettiest fix, since it ignores the verification every time. 

You should just pass array(CURLOPT_SSL_VERIFYPEER => false) as the $curl_options
parameter in OAuthRequester::requestRequestToken. This will do what you want.

Original comment by brunobg%...@gtempaccount.com on 26 May 2010 at 7:18