A possible solution to “SSL read: error … errno 10054”
This is just a quick post to note an error I came across today that I couldn't find any decent help with it. I was using cURL in PHP to connect via HTTPS to a web service, and came across the following error:
SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
It looks like it might be an error with OpenSSL, or with the server I was hitting, but it turned out to just be a rogue space.
I was generating a URL with a GET parameter (gregtyler.co.uk?getparam=somevalue), but it had generated with a space in the value. Now a web browser would turn that into a " " or plus symbol but cURL, for whatever reason, didn't.
So if you've come across this problem (and I'm putting this here with the hope that it'll be crawled for future people stuck), check to see if there's any whitespace in your URL and urlencode it.
All in all, a silly mistake on my behalf that caused far more trouble than it should have. Hopefully you won't be stuck the same way now!