Re: [PHP] Zip Way of life.

2003-03-26 Thread Marek Kilimajer
So use PclZip class, it is pure php without the need to have nay special 
extension installed

Vincent M. wrote:

Daevid Vincent wrote:

You could use the exec() or shell_exec() and just do it via command line
method...
Yes but gunzip does not work when there are more than one file in the 
zip file and unzip is not installed by default on Unix servers. :-(







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Zip Way of life.

2003-03-20 Thread Daevid Vincent
 zip file and unzip is not installed by on Unix servers. :-(

So either install it on the servers that need it, or distribute the un/zip
exe with your package in your projects local directory -- this also saves
you having to deal with different versions on different servers that may not
always do what you expect. At least this way it's a controlled environment. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Zip Way of life.

2003-03-19 Thread Vincent M.
Hello,

I'd like to uncompress to the Hard disk a zip file send by the browser.

At this time I do this:

function uncompresszip($zipfile) {
  copy($zipfile, dirname($_SERVER['PATH_TRANSLATED'])./zip/zipfile.zip) ;
}
But I do not understand how to uncompress the zip file, I tried for exemple:
$retour = 
readgzfile(dirname($_SERVER['PATH_TRANSLATED'])./zip/zipfile.zip);

But as mentionned in the php doc it outputs the content of the zip file 
in the browser :-(

How to uncompress a zip file in a directory ? I just want all the files 
which are in the zip file...

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Zip Way of life.

2003-03-19 Thread Marek Kilimajer
readgzfile is for *.gz files.
Either use zip file functions (rarely supported) or PclZip 
(http://www.phpconcept.net/pclzip/index.en.php)

Vincent M. wrote:

Hello,

I'd like to uncompress to the Hard disk a zip file send by the browser.

At this time I do this:

function uncompresszip($zipfile) {
  copy($zipfile, 
dirname($_SERVER['PATH_TRANSLATED'])./zip/zipfile.zip) ;
}

But I do not understand how to uncompress the zip file, I tried for 
exemple:
$retour = 
readgzfile(dirname($_SERVER['PATH_TRANSLATED'])./zip/zipfile.zip);

But as mentionned in the php doc it outputs the content of the zip 
file in the browser :-(

How to uncompress a zip file in a directory ? I just want all the 
files which are in the zip file...

Thanks,
Vincent.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Zip Way of life.

2003-03-19 Thread Vincent M.
Marek Kilimajer wrote:
readgzfile is for *.gz files.
Either use zip file functions (rarely supported) or PclZip 
(http://www.phpconcept.net/pclzip/index.en.php)

No, it works with .zip files too, I just don't know how to manage it :-(



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Zip Way of life.

2003-03-19 Thread Daevid Vincent
You could use the exec() or shell_exec() and just do it via command line
method...

 -Original Message-
 From: Vincent M. [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 19, 2003 12:36 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Zip Way of life.
 
 
 Hello,
 
 I'd like to uncompress to the Hard disk a zip file send by 
 the browser.
 
 At this time I do this:
 
 function uncompresszip($zipfile) {
copy($zipfile, 
 dirname($_SERVER['PATH_TRANSLATED'])./zip/zipfile.zip) ;
 }
 
 But I do not understand how to uncompress the zip file, I 
 tried for exemple:
 $retour = 
 readgzfile(dirname($_SERVER['PATH_TRANSLATED'])./zip/zipfile.zip);
 
 But as mentionned in the php doc it outputs the content of 
 the zip file 
 in the browser :-(
 
 How to uncompress a zip file in a directory ? I just want all 
 the files 
 which are in the zip file...
 
 Thanks,
 Vincent.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Zip Way of life.

2003-03-19 Thread David T-G
Vincent, et al --

...and then Vincent M. said...
% 
% Marek Kilimajer wrote:
% readgzfile is for *.gz files.
...
% No, it works with .zip files too, I just don't know how to manage it :-(

You mentioned wanting the files (note the plural) in the zip file.
AFAIK gunzip can unzip an archive containing a single file, but if you
have more than one in there then you need to use an actual unzip tool
(like, say, unzip :-)

While a class or a built-in command might be nice, if you just want to
get them out then a simple system call might be the easiest way to go.


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] Zip Way of life.

2003-03-19 Thread Vincent M.
David T-G wrote:
Vincent, et al --

...and then Vincent M. said...
% 
% Marek Kilimajer wrote:
% readgzfile is for *.gz files.
...
% No, it works with .zip files too, I just don't know how to manage it :-(

You mentioned wanting the files (note the plural) in the zip file.
AFAIK gunzip can unzip an archive containing a single file, but if you
have more than one in there then you need to use an actual unzip tool
(like, say, unzip :-)
While a class or a built-in command might be nice, if you just want to
get them out then a simple system call might be the easiest way to go.
HTH  HAND

:-D
Yes but gunzip does not work when there are more than one file in the 
zip file and unzip is not installed by on Unix servers. :-(

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Zip Way of life.

2003-03-19 Thread Vincent M.
Daevid Vincent wrote:
You could use the exec() or shell_exec() and just do it via command line
method...
Yes but gunzip does not work when there are more than one file in the 
zip file and unzip is not installed by default on Unix servers. :-(





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Zip Way of life.

2003-03-19 Thread David T-G
Vincent --

...and then Vincent M. said...
% 
% David T-G wrote:
% 
% ...and then Vincent M. said...
% % 
...
% % No, it works with .zip files too, I just don't know how to manage it :-(
% 
...
% AFAIK gunzip can unzip an archive containing a single file, but if you
% have more than one in there then you need to use an actual unzip tool
...
% 
% Yes but gunzip does not work when there are more than one file in the 

Right.  That's exactly what I said.  Is there still any confusion?


% zip file and unzip is not installed by on Unix servers. :-(

So go and get your own copy and put it on!


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature