Re: php mirrors
| From: | Jeroen van Wolffelaar | Date: | Sun, 28 Oct 2001 23:11:21 +0000 |
| Subject: | Re: php mirrors | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-7238@lists.php.net to get a copy of this message | ||
On Mon, 29 Oct 2001, Hojtsy Gabor wrote:
> > > OK, I applied your patch, with some minor modifications.
> > > It works on www.php.net and on hu.php.net (athough the fopen
> > > adds some time to the download).
> >
> > It shouldn't... maybe add a flush after the header and before the fopen?
> > Because the user's browser should go immediately to the file, the mirror
> > doesn't need the user for logging. In fact the output to the
> > browser could be closed,
> > maybe the fopen should be register_shutdown_function'ed? Then it's also
> > certain that the user won't see any logging errors, as is the whole
> > purpose of the patch.
>
> I don't know what is the right method. Flush doesn't seem to be, maybe
> register_shutdown_function()...
>
> User won't see any logging errors, as I have addded a @ before fopen,
> so no errors will output, if php.net can't be opened.
The user won't see anything anyway, because of the immediate redirect.
I didn't put a @ for possible debugging purposes, because with a telnet
80 you'll be able to see the error, if there's one.
shutdownfunction seems the best solution indeed, you simply don't want
to wait until logging is done, because nothing will change wether or not
it fails: the download should happen in both cases.
--Jeroen
>
> Goba
>
>
Jeroen van Wolffelaar
Jeroen@A-Eskwadraat.nl
http://www.A-Eskwadraat.nl/~jeroen