Php Curl error: Error receiving data from partner

I had a basic Curl script that basically ran the script on a remote server. I worked fine for about 6 months.

Yesterday he stopped working and returned the next error.

Twisting error: error while receiving data from partner

I would like to know if anyone knows under what conditions curl will return such an error?

+4
source share
1 answer

When you are working with a 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 somewhere.

Bugfix: CURLOPT_STDERR really needed a stream resource, since @ LΓΌbnah points to comments, and @Roman tried to edit (although reviewers had previously refused to edit, now I included it in the response).

+10
source

Source: https://habr.com/ru/post/1313435/


All Articles