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).
source share