fennb / phirehose

PHP interface to Twitter Streaming API
709 stars 189 forks source link

DNS resolution results in SSL connection failures on PHP7.0 RC1 #89

Closed lgladdy closed 8 years ago

lgladdy commented 8 years ago

PHP 7 validates certificates correctly for ssl schemes in fsockopen, meaning phirehose breaks under PHP 7.

I commented out the DNS code and replaced $streamIP with the hostname, and that works - but I won't submit it as a PR as i'm not sure if the issues with DNS caching are still present that led you to connecting via IP in the first place.

fennb commented 8 years ago

I seem to remember that was a workaround for a bug in a very old version of PHP (I actually thought it had already been removed).

If you'd like to submit a pull request we can probably merge in a fix!

fennb commented 8 years ago

Actually, I was right, this was already fixed some time ago in 3fa2831c4833df61f2894de6b79231ab928e8c40 - Were you using an older version perhaps?

DarrenCook commented 8 years ago

Actually, I was right, this was already fixed some time ago in 3fa2831c4833df61f2894de6b79231ab928e8c40 - Were you using an older version perhaps?

I hit (what sounds like) this problem when I moved a server to php 5.5, and then upgrading phirehose to include the above commit fixed it.

So, if it still fails after making sure you are using the latest version, it'd be useful to know what PHP version you were using before, i.e. where it was working.

Darren