My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 13: PHP warning file_get_contents ssl connection reset by peer
3 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Nov 2010


 
Reported by benvanae...@gmail.com, Oct 29, 2010
Not sure if this is related to  issue 6 , as it is also giving a warning with file_get_contents.
This is the error I'm getting when trying to login to Yahoo or Flickr (which is actually the same):

Warning: file_get_contents() [function.file-get-contents]: SSL: Connection reset by peer in /path/to/lightopenid/openid.php on line 212

If you need more info, please ask, as I'm not sure where to look for possible causes.
Oct 29, 2010
Project Member #1 mewp...@gmail.com
Can't really debug this. I've registered with Yahoo, tested it, and can reproduce the bug. However, I don't think that it's LightOpenID's fault. I've checked the network traffic with wireshark -- Yahoo's server is sending a TCP RST packet at the end of the connection, i.e. it's resetting it. I have no idea why does it do so, and I can't really fix it (otherwise than adding an @ before file_get_contents).

If you think of any better solution, please tell me.
Status: Accepted
Nov 1, 2010
#2 o.vese...@gmail.com
I also have the error "file_get_contents(): SSL: Connection reset by peer" while trying to login with Yahoo  via  "http://me.yahoo.com" identity.

With cURL everything worked perfectly.
Thanks a lot.
Nov 2, 2010
Project Member #3 mewp...@gmail.com
If I won't be able to fix it using php streams, I'll add the cURL support back (to be used by default if avaiable). However, since apparently not everyone has curl installed, I'd prefer a streams-based solution.
Nov 7, 2010
Project Member #4 mewp...@gmail.com
I have added curl support again. It seems to work with yahoo without any problems.

Please verify that it works.
Status: Fixed
Nov 7, 2010
#5 benvanae...@gmail.com
is the new code already available?
Nov 7, 2010
Project Member #6 mewp...@gmail.com
Of course it is, on gitorious.

http://gitorious.org/lightopenid/lightopenid/archive-tarball/master
Nov 7, 2010
#7 benvanae...@gmail.com
Sorry, was searching in the wrong place :)
I can confirm that this issue is resolved... no problems at all when logging in with Yahoo!

sidenote: using identi.ca works now too.

Thanks for fixing the issue!
May 11, 2011
#8 hunter...@gmail.com
I run into this issue due to the save mode detection: `ini_get('safe_mode')`

If I remove the detection and use request_curl instead, it works fine.



May 12, 2011
Project Member #9 mewp...@gmail.com
If you have safe_mode enabled and use curl, you get another warning instead (saying taht follow_location can't be used in safe_mode). And it's more common to get this warning than a connection reset from streams (which I can do nothing about), so I've decided to use streams with safe_mode.
May 15, 2011
#10 rich...@securebucket.com
I was getting this same error only for yahoo logins.  (comparing to google).  Turning off open_basedir fixed the issue.  Is there a better solution?  I have curl
May 16, 2011
Project Member #11 mewp...@gmail.com
CURL does noe work well with either safe_mode or open_basedir, because in both cases, follow_location won't work. Since I can't really do anything about it, it's disabled by default if either open_basedir or safe_mode are enabled.
Jan 11, 2012
#12 m...@janhohner.de
When trying to log in with Yahoo I get that error message:
Warning: file_get_contents() [function.file-get-contents]: SSL: Connection reset by peer in /path/to/lightopenid/openid.php on line 345

Google on the other hand works perfectly. Any ideas?
Jan 11, 2012
Project Member #13 mewp...@gmail.com
Have you tried using cURL instead of stream wrappers?

As I've said in a previous message in this bug, I can't do anything with the stream wrappers to make it work.
Jan 12, 2012
#14 m...@janhohner.de
Ah ok, I overread that.
Unfortunately I cannot use cURL because my cloud host relies on open_basedir, so that won't work for me. I think I read about a fix for that cURL problem somewhere, I'll go looking for that.
Jan 12, 2012
#15 m...@janhohner.de
I found the "fix" for the problem, and integrated it into the code. You can find it here: https://bitbucket.org/janhohner/janhohner-lightopenid/
Feel free to use my changes if you like them.

Powered by Google Project Hosting