I have a cron job setup on one server to run a backup script in PHP that is hosted on another server.
The command I\'ve been using is
curl -sS http://w
In my case (curl 7.47.0), it is because I set the header content-length
on curl command manually with a value which is calculated by postman (I used postman to generate curl command parameters and copy them to shell). After I delete header content-length
, it works normally.
In my case this was caused by a PHP APC problem. First place to look would be the Apache error logs (if you are using Apache).
Hope this helps somebody.
It happens when you are trying to access secure Website like Https.
I hope you missed 's'
Try Changing URL to curl -sS -u "username:password" https://www.example.com/backup.php
I've had this problem before. Figured out I had another application using the same port (3000).
Easy way to find this out:
In the terminal, type netstat -a -p TCP -n | grep 3000
(substitute the port you're using for the '3000'). If there is more than one listening, something else is already occupying that port. You should stop that process or change the port for your new process.
In case of SSL connections this may be caused by issue in older versions of nginx server that segfault during curl and Safari requests. This bug was fixed around version 1.10 of nginx but there is still a lot of older versions of nginx on the internet.
For nginx admins: adding ssl_session_cache shared:SSL:1m;
to http
block should solve the problem.
I'm aware that OP was asking for non-SSL case but since this is the top page in goole for "empty reply from server" issue, I'm leaving the SSL answer here as I was one of many that was banging my head against the wall with this issue.
In my case I was using uwsgi, added the property http-timeout for more then 60 seconds but it was not working because of some extra space and config file was not getting loaded properly.