#34567 [Opn->Fbk]: Outputs "Cannot find server"
| From: | sniper@php.net | Date: | Tue, 20 Sep 2005 20:01:41 +0000 |
| Subject: | #34567 [Opn->Fbk]: Outputs "Cannot find server" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-85302@lists.php.net to get a copy of this message | ||
ID: 34567
Updated by: sniper@php.net
Reported By: sheffmail at mail dot ru
-Status: Open
+Status: Feedback
Bug Type: cURL related
Operating System: Linux
PHP Version: 4.4.0
Previous Comments:
------------------------------------------------------------------------
[2005-09-20 22:00:31] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
I can't reproduce this. If you still get the problem with 5.1-dev, let
us know what curl version you have, what configure options you used,
etc.
------------------------------------------------------------------------
[2005-09-20 19:54:06] sheffmail at mail dot ru
Description:
------------
I have a script which suppose to output remote page's content, but it
doesn't.
I have an assumption that it happens because the location pointed to by
URL in the script returns 'Location:' header and redirects to another
page + using port different from 80. On Linux OS it outputs "Cannot
find server", on Windows it works OK and outputs the page. How can I
make it work in Linux ? Or if it's not because of OS, then why does it
occur and how could this be fixed?
Reproduce code:
---------------
set_time_limit(0);
$ch = curl_init();
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_MAXREDIRS,100);
curl_setopt($ch,CURLOPT_URL,"http://www.mtsu.edu/~devstud2/DSM080.html");
$buffer = curl_exec($ch);
if (curl_errno($ch) == CURLE_OK )
{
echo $buffer;
}
else
{
echo "no";
}
curl_close($ch);
Expected result:
----------------
The content of the page
Actual result:
--------------
The script just breaks without printing "no" or error or warning, some
times giving "Cannot find server" error.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34567&edit=1