twitteroauth curl http_code returns zero

300 views
Skip to first unread message

Enric

unread,
Dec 30, 2010, 10:06:20 AM12/30/10
to Twitter Development Talk
Hi, we developed an application that was hosted in a server that had
problems so we changed to dreamhost (the server we usually use and
where we had tested the application without problems).

In the new dreamhost account we installed the application but it is no
possible to authenticate, the curl returns http_code = 0...

I checked the code but I can't find the problem, here is the dump:

TwitterOAuth Object
(
[http_code] => 0
[url] => https://api.twitter.com/oauth/request_token?oauth_ca...
[host] => https://api.twitter.com/1/
[timeout] => 30
[connecttimeout] => 30
[ssl_verifypeer] =>
[format] => json
[decode_json] => 1
[http_info] => Array
(
[url] => https://api.twitter.com/oauth/request_token?oauth_cal...
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 2.4E-5
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)

[useragent] => TwitterOAuth v0.2.0-beta2
[sha1_method] => OAuthSignatureMethod_HMAC_SHA1 Object
(
)

[consumer] => OAuthConsumer Object
(
[key] => ...
[secret] => ...
[callback_url] =>
)

[token] => OAuthConsumer Object
(
[key] =>
[secret] =>
[callback_url] =>
)

)

Thanks

Abraham Williams

unread,
Dec 31, 2010, 9:48:03 AM12/31/10
to twitter-deve...@googlegroups.com
cURL returning a http_code of 0 generally means that your server can't make connections to https://api.twitter.com. Make sure you don't have a firewall blocking connections.

Abraham
-------------
Abraham Williams | Hacker Advocate | abrah.am
@abraham | github.com/abraham | blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.




--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: http://groups.google.com/group/twitter-development-talk

Enric

unread,
Dec 31, 2010, 11:43:54 AM12/31/10
to Twitter Development Talk
Thanks Abraham!

We just have reiceved an answer from dreamhost support telling that
the server where the site is hosted was blocked by twitter. The server
in dreamhost where we had tested the app was not blocked... that
brought us headaches :S

Thank you again and happy new year.

On Dec 31, 11:48 am, Abraham Williams <4bra...@gmail.com> wrote:
> cURL returning a http_code of 0 generally means that your server can't make
> connections tohttps://api.twitter.com. Make sure you don't have a firewall
> blocking connections.
>
> Abraham
> -------------
> Abraham Williams | Hacker Advocate | abrah.am
> @abraham <https://twitter.com/abraham> | github.com/abraham | blog.abrah.am
Reply all
Reply to author
Forward
0 new messages