By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,143 Members | 1,854 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,143 IT Pros & Developers. It's quick & easy.

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

P: 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

Sep 30 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
comp.lang.php wrote:
<snip>
I am thinking "WZZIP" is a big mistake, or, bad installation, or.. ??

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


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/

Oct 2 '05 #2

P: n/a
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

Oct 3 '05 #3

P: n/a
On 3 Oct 2005 08:20:35 -0700, comp.lang.php wrote:
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


Please look at http://www.safalra.com/special/googlegroupsreply/
Oct 3 '05 #4

P: n/a
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:
On 3 Oct 2005 08:20:35 -0700, comp.lang.php wrote:
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


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


Oct 4 '05 #5

P: n/a
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

Oct 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.