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
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:
MUST BE VALID
Solve the problem:
12 + 20 = ?
Subscribe to this entry?

 
 [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: Sun Oct 13 22:01:27 2024 UTC