PHP 5.0.4 with Windows XP - trying to do file zip utility causes Apache 2.0.53 to crash

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • comp.lang.php

    PHP 5.0.4 with Windows XP - trying to do file zip utility causes Apache 2.0.53 to crash

    Has anyone had any luck with file zipping utilities for PHP 4-5 and
    Windows XP with Apache 2.0.53?

    Following is my code snippet:

    PHP Code:
    if ($this->isSuccessful ) { // RUN ZIP COMMAND BASED
    UPON STRING
    $zipName = ($album) ? "${section}s_$a lbum" : "${section} s";
    $zipName .= '.zip';
    // NEW 4/1/2005 SEE NOTES IN classes.inc.php ON
    getKommandOSArr ay() METHOD
    list($zipKomman d, $zipRedirect) =
    @array_values($ this->getKommandOSAr ray('zip-jF9'));
    $msg = exec("$zipKomma nd $locationPath/$zipName " .
    trim($imageList ) . " $zipRedirect");
    if (preg_match('/zip error:/i', $msg)) {
    $this->isSuccessful = false;
    $this->setErrorArray( array('action' => "Error attempting to
    create zip file from album \"$album\": " . nl2br($msg)));
    }
    if ($this->isSuccessful && is_file("$locat ionPath/$zipName")
    && (int)@filesize( "$locationP ath/$zipName") >
    (int)$maxDownlo adableFileSize) {
    $this->isSuccessful = false;
    $this->setErrorArray( array('willDown loadDisk' => 'ZIP archive
    file size is larger than maximum allowable downloadable file size of '
    ..

    DownloadableCom ponentsView::di splayReadableMa xDownloadableFi leSize() .
    ', file
    destroyed'
    )
    );
    @unlink("$locat ionPath/$zipName");
    }
    }
    }

    Where "zip-jF9" in Windows comes out to be

    Quote:
    wzzip -u -en


    I read online that WZZIP is a utility that will allow for using WinZip
    in Windows within a command line prompt, which I would need to do in
    order to use PHP's exec() command to do such.

    Following are the steps I took:

    1) Downloaded and installed WZZIP - making sure wzzip.exe and
    wzunzip.exe exist in the same folder as winzip32.exe
    2) Added "C:\Program Files\WinZip" to my PATH environmental variable
    3) Rebooted
    4) Restarted Apache

    However, upon attempt to run the above PHP snippet, my Firefox and my
    IE windows both locked up and Apache crashed!

    I am thinking "WZZIP" is a big mistake, or, bad installation, or.. ??

    Any thoughts or alternative ideas for file zipping in Windows using
    PHP?

    Thanx
    Phil

  • R. Rajesh Jeba Anbiah

    #2
    Re: PHP 5.0.4 with Windows XP - trying to do file zip utility causes Apache 2.0.53 to crash

    comp.lang.php wrote:
    <snip>[color=blue]
    > I am thinking "WZZIP" is a big mistake, or, bad installation, or.. ??
    >
    > Any thoughts or alternative ideas for file zipping in Windows using
    > PHP?[/color]

    1. http://in2.php.net/zip
    2. http://in2.php.net/bzip
    3. http://cvs.php.net/pear/Archive_Zip/

    --
    <?php echo 'Just another PHP saint'; ?>
    Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

    Comment

    • comp.lang.php

      #3
      Re: PHP 5.0.4 with Windows XP - trying to do file zip utility causes Apache 2.0.53 to crash

      I read about both of those, but neither are practical for a portable,
      cross-platform, cross-version web application as mandated by the
      contractual obligations, sorry. They are great and useful, but this
      has to work in PHP 4.1.2 - 5+, Windows and UNIX, and be completely and
      fully portable (and I didn't list the other demands, it just gets
      worse)

      Phil

      Comment

      • Obvious

        #4
        Re: PHP 5.0.4 with Windows XP - trying to do file zip utility causes Apache 2.0.53 to crash

        On 3 Oct 2005 08:20:35 -0700, comp.lang.php wrote:
        [color=blue]
        > I read about both of those, but neither are practical for a portable,
        > cross-platform, cross-version web application as mandated by the
        > contractual obligations, sorry. They are great and useful, but this
        > has to work in PHP 4.1.2 - 5+, Windows and UNIX, and be completely and
        > fully portable (and I didn't list the other demands, it just gets
        > worse)
        >
        > Phil[/color]

        Please look at http://www.safalra.com/special/googlegroupsreply/

        Comment

        • comp.lang.php

          #5
          Re: PHP 5.0.4 with Windows XP - trying to do file zip utility causes Apache 2.0.53 to crash

          Ok, is that better? Now, do you happen to know the solution to the
          problem involving a file zip utility for Windows XP for a portable web
          application?

          Phil


          Obvious wrote:[color=blue]
          > On 3 Oct 2005 08:20:35 -0700, comp.lang.php wrote:
          >[color=green]
          > > I read about both of those, but neither are practical for a portable,
          > > cross-platform, cross-version web application as mandated by the
          > > contractual obligations, sorry. They are great and useful, but this
          > > has to work in PHP 4.1.2 - 5+, Windows and UNIX, and be completely and
          > > fully portable (and I didn't list the other demands, it just gets
          > > worse)
          > >
          > > Phil[/color]
          >
          > Please look at http://www.safalra.com/special/googlegroupsreply/[/color]

          Comment

          • comp.lang.php

            #6
            Re: PHP 5.0.4 with Windows XP - trying to do file zip utility causes Apache 2.0.53 to crash

            Thanx!! A modification of Archive_Zip did the trick! And it seems to
            only be necessary within Windows/Apache as WZZIP is reported to work
            within Windows/IIS using PHP 5+.

            Thanx again!
            Phil

            Comment

            Working...