#38340 [Opn->Bgs]: Curl error : 'Empty reply from server'
| From: | iliaa@php.net | Date: | Sat, 05 Aug 2006 15:01:29 +0000 |
| Subject: | #38340 [Opn->Bgs]: Curl error : 'Empty reply from server' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-100386@lists.php.net to get a copy of this message | ||
ID: 38340
Updated by: iliaa@php.net
Reported By: manikandan dot r at greynium dot com
-Status: Open
+Status: Bogus
Bug Type: cURL related
PHP Version: 5.1.4
New Comment:
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 http://www.php.net/support.php 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).
Previous Comments:
------------------------------------------------------------------------
[2006-08-05 12:50:23] 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);
curl_exec($ch);
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
---
Mani
------------------------------------------------------------------------
[2006-08-05 10:45:25] derick@php.net
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 07:03:51] manikandan dot r at greynium dot com
Description:
------------
When i am accessing the remote url through CURL, got the following
error:
'Empty reply from server'
How to resolve it?
Thanks in advance
--
Mani
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'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38340&edit=1