卷曲错误52“来自服务器的空答复"是什么? [英] What is the curl error 52 "empty reply from server"?

查看:45
本文介绍了卷曲错误52“来自服务器的空答复"是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一台服务器上有一个cron作业设置,以便在另一台服务器上托管的PHP中运行备份脚本.

I have a cron job setup on one server to run a backup script in PHP that is hosted on another server.

我一直在使用的命令是

curl -sS http://www.example.com/backup.php

最近,当Cron运行时,我一直收到此错误:

Lately I've been getting this error when the Cron runs:

curl: (52) Empty reply from server

如果我直接在浏览器中转到链接,则脚本运行良好,并且得到了我的小备份ZIP文件.

If I go to the link directly in my browser the script runs fine and I get my little backup ZIP file.

推荐答案

如果要求curl在执行HTTPS的服务器上执行纯HTTP,则会发生这种情况.

This can happen if curl is asked to do plain HTTP on a server that does HTTPS.

示例:

$ curl http://google.com:443
curl: (52) Empty reply from server

这篇关于卷曲错误52“来自服务器的空答复"是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆