I had a basic Curl script which basically executed a script on remote server. I was working fine from around 6 months.
Yesterday it stopped working, and was giving back following error.
Curl error: Failure when receiving data from the peer
Would like to know if anyone knows on which condition the curl would returned such error?
When dealing with problem with curl, run it again with:
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_STDERR, fopen('php://output', 'w'));
Usually the exact error message is in there somewhere.
Fixed: CURLOPT_STDERR
indeed needs a stream resource as @Lübnah states in the comments, and @Roman tried to edit in (although earlier reviewers denied the edit, I've now included it in the answer).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With