php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34567 Outputs "Cannot find server"
Submitted: 2005-09-20 19:54 UTC Modified: 2005-09-28 01:00 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: sheffmail at mail dot ru Assigned:
Status: No Feedback Package: cURL related
PHP Version: 4.4.0 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sheffmail at mail dot ru
New email:
PHP Version: OS:

 

 [2005-09-20 19:54 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-20 22:00 UTC] 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-28 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC