Re: Re[4]: [PEAR-DEV] Re: go-pear. Was:Re[2]: [PEAR-DEV] XML_RPC
| From: | Justin Patrin | Date: | Wed, 08 Dec 2004 21:54:07 +0000 |
| Subject: | Re: Re[4]: [PEAR-DEV] Re: go-pear. Was:Re[2]: [PEAR-DEV] XML_RPC | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34925@lists.php.net to get a copy of this message | ||
On Wed, 8 Dec 2004 22:11:00 +0200, anatoly techtonik <techtonik@php.net> wrote:
> Hello Justin,
>
>
>
> >> >> Also go-pear can't handle correctly if internet connection is
> >> >> available. I've already proposed a workaround in Net_Socket and
> >> >> XML_RPC for this issue - gethostbyname() should be called before
> >> >> fsockopen()
> >>
> >> PAJ> What's the problem with go-pear working on a host with internet
> >> PAJ> access?
> >>
> >> Sorry, my fault. There should be phrase 'internet connection
> >> "isn\'t"
> >> available' or the word 'unavailable' in my post.
> >>
> >> PAJ> Do you have any other good ideas? Calling gethostbyname before
> >> PAJ> fsockopen is nothing than ugly and slow.
> >>
> >> fsockopen will call it anyway. You can try to call fsockopen with some
> >> fiction url and meditate a bit about it's error message. I'd be very
> >> glad if you can make a solution how to handle that error or at least
> >> suppress to handle it later.
> >>
>
> JP> *WHY*? If you don't have internet access you can't run a script which
> JP> needs to connect to the internet....that's how it works. Calling
> JP> gethostbyname will be just as slow.
>
> I miss you point probably. Do you really think one should not run go-pear
> if he hasn't internet connection? How about PHP distributives?
It was my understanding that go-pear is supposed to be used to
bootstrap a PHP installation from the web. If it's being distributed
(on a CD I would assume) then it should be installed another way...say
from an already bootstrapped installation of PEAR on the CD.
go-pear *must* have internet access. If it doesn't it can't download
the packages. Therefore it *must* be online to work.
However I do see your point. If it fails in a nasty way (i.e. PHP
errors) then perhaps a gethostbyname() call should be used, checked,
and then the script dies with "no internet connection" or something
similar. It just seems strange to me that someone would be using
go-pear without an internet connection...
>
> Even if it so, how about to tell that user? Do you really think, that
> it is good for PEAR installation to crash with with standard PHP
> error message? If not - please, try to
> > call fsockopen with some fiction url
> first. Or try to install optional packages in PHP5 via go-pear install
> without internet connection to see what I want to fix.
>
> As for calling gethostbyname before fsockopen() - I don't know exactly,
> but how'd you think - are these DNS requests cached? How long it takes
> to call gethostbyname() with regard to XML-RPC parsing time? Take into
> account, that these two operations are called together in 1:1 ratio.
>
> No offence. Just trying to follow your logic chain.
>
> t
> --
>
>
--
Justin Patrin