Re: Mirror.php

Поиск
Список
Период
Сортировка
От Alexey Borzov
Тема Re: Mirror.php
Дата
Msg-id 41B2035B.8020208@cs.msu.su
обсуждение исходный текст
Ответ на Re: Mirror.php  ("Dave Page" <dpage@vale-housing.co.uk>)
Список pgsql-www
Hi,

Dave Page wrote:
> My box, your code! :-) I saw you wrote the Pear modules as well. Anyway,
> I noticed the ipv6 stuff as well, but IPv6 is not even installed on that
> box. It's not included as a kernel module or compiled in.
>
> I hacked up the following test programs:
>
>   $fp = fsockopen("wwwmaster.postgresql.org", 80);
>   $out = "GET / HTTP/1.1\r\n";
>   $out .= "Host: wwwmaster.postgresql.org\r\n";
>   $out .= "Connection: Close\r\n\r\n";
>
>   fwrite($fp, $out);
>   while (!feof($fp)) {
>      echo fgets($fp, 128);
>   }
>   fclose($fp);
>
> Both of which work exactly as expected on wwwmaster, which is fairly
> conclusive that the ipv4 sockets and http code in fopen are working fine
> - so, any idea what it is that the Pear code might be doing that is
> throwing this error? If we can figure that out, I stand more of a chance
> of solving the problem :-)

::scratches head::
Well, the PEAR code boils down to the example above if you strip all the pretty
stuff out. Please try running the following script, maybe it will give some insight:

<?php
error_reporting(E_ALL);
var_dump(gethostbyname('wwwmaster.postgresql.org'));

require_once 'HTTP/Request.php';
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'var_dump');
$req =& new HTTP_Request('http://wwwmaster.postgresql.org/');
$req->sendRequest();
?>

В списке pgsql-www по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: Mirror.php
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: Mirror.php