Some of the causes and fixes of this curl error are listed below;
i. This can happen if curl is asked to do plain HTTP on a server that is configured to use #HTTPS.
ii. Curl gives this error when there is no reply from a server, since it is an error for HTTP not to respond anything to a request.
iii. A firewall or a proxy conflict can trigger #curl 52 empty reply from server error.
So executing the following command;
Can help resolve this error.
iv. Another common reason for an empty reply is timeout. Check all the hops from where the cron job is running from to your PHP/target server. There's probably a device/server/nginx/LB/proxy somewhere along the line that terminates the request earlier than you expected, resulting in an empty response.
v. SSL connections this may be caused by issue in older versions of nginx server that segfault during curl and Safari requests.
For nginx admins: adding ssl_session_cache shared:SSL:1m; to http block should solve the problem.
vi. It can be a #PHP APC related problem. To find out what the issue is, simply look into the Apache error logs (if you are using Apache).
vii. SSL certificate expiration can be the cause. So ensure that the #SSL #Certificate is valid and new it if expired.
For detailed solution and process to fix "curl 52 empty reply from server", go to https://ibmimedia.com/blog/46/solve-curl-52-empty-reply-from-server