Zip file processing without recompiling PHP

Discussion in 'Perl' started by Andy, Jan 19, 2004.

  1. Andy

    Andy Guest

    I am trying to create an OsCommerce plugin that parses a number of
    files and adds them to the catalog.
    I need some method of transferring the files to be parsed to the
    server with OsC.
    Ideally, I would like to send these as a zip file, but in order to
    keep the installation requirements and user knowledge requirements to
    a minimum I would prefer not to have the client recompile PHP with zip
    support.
    Does anyone know of a module that will parse zip files without any
    prerequisites?
    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.
    Also, is there any function that can be used to create a temp
    directory with a unique name (equivalent of tempnam)? 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.

    Many thanks in advance for your assistance.

    Best Regards
    Andy
    Andy, Jan 19, 2004
    #1
    1. Advertising

  2. 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
    Jürgen Exner, Jan 20, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sezai Altýnok

    forms without recompiling

    Sezai Altýnok, Mar 17, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    502
    nanda
    Mar 29, 2005
  2. Christopher Kimbell

    Adding new pages without recompiling whole site

    Christopher Kimbell, Jul 1, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    306
  3. Phil Winstanley [Microsoft MVP ASP.NET]

    Re: Adding new pages without recompiling whole site

    Phil Winstanley [Microsoft MVP ASP.NET], Jul 1, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    312
    Christopher Kimbell
    Jul 1, 2004
  4. Replies:
    2
    Views:
    441
    Marina Levit [MVP]
    Oct 24, 2006
  5. Rajive Narain
    Replies:
    0
    Views:
    1,463
    Rajive Narain
    Sep 18, 2009
Loading...

Share This Page