|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38340 Curl error : 'Empty reply from server'
Submitted: 2006-08-05 07:03 UTC Modified: 2006-08-05 15:01 UTC
From: manikandan dot r at greynium dot com Assigned:
Status: Not a bug Package: cURL related
PHP Version: 5.1.4 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
8 - 7 = ?
Subscribe to this entry?

 [2006-08-05 07:03 UTC] manikandan dot r at greynium dot com
When i am accessing the remote url through CURL, got the following error:

'Empty reply from server'

How to resolve it?

Thanks in advance


Reproduce code:
/* crawling starts here */
	$ch = curl_init($url);
	curl_setopt ($ch, CURLOPT_FILE, $fp);
	curl_setopt ($ch, CURLOPT_FAILONERROR, true);
	curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);

    /* if crawling fails, mail will be sent */
	if(!curl_exec($ch)) {

Expected result:
Expected to get the content of the remote url

Actual result:
'Empty reply from server'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-05 10:45 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
 [2006-08-05 12:50 UTC] manikandan dot r at greynium dot com
I think following code snippet will help you to diagnose the problem.

$ch = curl_init($url);
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_FAILONERROR, true);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
echo curl_error($ch);

I have used the above code in my php file and it give me an "Empty reply from server" instead of the url content.

Actually i used to pass city name in url dynamically, the issue is its working well with some cities.

But there wont be any problem with city names it seems.

Hope above explanation help you to give me an solution

 [2006-08-05 15:01 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

The PHP/cURL code works properly, what's happening is that the 
URl you are trying to access returns a blank page (usually due 
to scripting error on the server).
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jan 23 03:01:26 2021 UTC