ID: 14976
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: ANY (Linux)
PHP Version: 4.1.1
New Comment:
You can do this in 4.3:
fopen("compress.zlib://http://foobar.com");
It would be great if you could test RC2 and verify that
this works.
RC2 available from http://qa.php.net
Previous Comments:
------------------------------------------------------------------------
[2002-01-10 15:06:18] [EMAIL PROTECTED]
One feature of PHP that I find REALLY handy is the
transparent handling of 'remote' files (i.e. http:// and
ftp:// URL's).
Currently gzopen "doesn't quite" handle anything but local
files. Attempting to gzopen, for example, an
"ftp://some.host.net/pub/somefile.gz" URL currently
returns a strange error (the error itself reported as
Bug#14814).
I traced a gzopen("ftp://some.host.net/pub/somefile.gz")
sort of connection with ethereal, and noticed that
connection to the ftp server IS made, login is performed,
passive mode switched to, and the file is STARTED
downloading (about 3 1k packets came across) but the
script dies with a "Warning: Success in ...." error
message.
As I'm running the script from the command line as a
standalone utility, I can instead do something like :
wget -q ftp://some.host.net/pub/somefile.gz | php
gzfilething.php > gzoutput.txt
and gzopen("php://stdin") to process the text, and it does
work fine, but it's a bit awkward to use and is
inconsistent with fopen()'s behavior.
Note that the fopen with "zlib:" URL's doesn't work for
remote files, either (how would you write such a thing?
fopen("zlib:ftp://some.host.net/pub/somefile.gz","r")? I
tried several variations and confirmed that zlib:
automatically assumes a local filehandle.
Thanks!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=14976&edit=1