Connecting Tech Pros Worldwide Help | Site Map

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

  #1  
Old September 30th, 2005, 04:05 PM
comp.lang.php
Guest
 
Posts: n/a
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_$album" : "${section}s";
$zipName .= '.zip';
// NEW 4/1/2005 SEE NOTES IN classes.inc.php ON
getKommandOSArray() METHOD
list($zipKommand, $zipRedirect) =
@array_values($this->getKommandOSArray('zip-jF9'));
$msg = exec("$zipKommand $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("$locationPath/$zipName")
&& (int)@filesize("$locationPath/$zipName") >
(int)$maxDownloadableFileSize) {
$this->isSuccessful = false;
$this->setErrorArray(array('willDownloadDisk' => 'ZIP archive
file size is larger than maximum allowable downloadable file size of '
..

DownloadableComponentsView::displayReadableMaxDown loadableFileSize() .
', file
destroyed'
)
);
@unlink("$locationPath/$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

  #2  
Old October 2nd, 2005, 05:05 PM
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a

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/

  #3  
Old October 3rd, 2005, 04:25 PM
comp.lang.php
Guest
 
Posts: n/a

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

  #4  
Old October 3rd, 2005, 05:55 PM
Obvious
Guest
 
Posts: n/a

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/
  #5  
Old October 4th, 2005, 07:45 PM
comp.lang.php
Guest
 
Posts: n/a

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]

  #6  
Old October 13th, 2005, 08:35 PM
comp.lang.php
Guest
 
Posts: n/a

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

Closed Thread