Re: Zip file processing without recompiling PHP

From: Jürgen Exner (jurgenex_at_hotmail.com)
Date: 01/20/04


Date: Tue, 20 Jan 2004 02:25:16 GMT

Andy wrote:
[...]
> a minimum I would prefer not to have the client recompile PHP with zip
> support.

Why would any client (whatever you mean by "client") need PHP when running
Perl to begin with?

> Does anyone know of a module that will parse zip files without any
> prerequisites?

Did you check CPAN.org? What does a search for ZIP return?
Or just do a plain "perldoc Archive::ZIP", it might even be installed
already.

> I have searched google and usenet and not found anything useful.
> Everything seems to point to the Zip module which requires ZZiplib and
> recompilation of the PHP interpreter.

Again, what does Perl have to do with PHP?

> Also, is there any function that can be used to create a temp
> directory with a unique name (equivalent of tempnam)?

Is there anything wrong with "mkdir()", details see "perldoc -f mkdir"?
And as far as temporary file names go: "perldoc -q temp" has some
interesting insights and suggestions.

> I would imagine
> that there are security concerns involved in creating a tempnam file,
> unlinking it and recreating a directory with the filename returned,
> although this would be preferred to some other method of creating a
> directory.

No idea what you are talking about. Why would you want to create a file
first, delete it, and then create a temp directory with the same name?
Anything wrong with creating the directory right away? After all,
directories are nothing but files in a special format.

jue



Relevant Pages

  • Re: HELP: send binary replies back and forth ???
    ... a client, not a server. ... simple php function to set the timeout), ... Issues in writing php server are: ... >> and communication then goes back and forth between the server and client ...
    (comp.lang.php)
  • HELP: send binary replies back and forth ???
    ... The PHP script receives a request from a client, ... My PHP script loops through all records and sends each of them ONE BY ONE. ... to be able to communicate with apache. ...
    (comp.lang.php)
  • Re: Advantages and disadvantages of PHP?
    ... Sometimes it's PHP, sometimes Java, sometimes something else. ... You'll find, for instance, that while your hosting company offers ASP.NET, their offer in fairly rare, and their price much above equivalent hosting offers in other languages. ... wanted to keep that client. ...
    (comp.lang.php)
  • Re: [PHP] Re: Delete Temporary Internet Files
    ... PHP and IIS / Apache on his local machine. ... > can't read the client files with PHP. ... > Protect your identity with Yahoo! ...
    (php.general)
  • Re: Authoring tool recommendation
    ... PHP or some other server side language. ... What if the person confuses "ASP" with a client-side language? ... client side scripts for fancying up a page, ...
    (comp.infosystems.www.authoring.html)