I am in need of help on unziping a file that is on my server and chmod to 777 on all files in the direcory after unziped I found the following code on the php.net site but it requires the ZZIPlib and my server does not have it is there a way to get it to work do I just need the lib and include it in the script if so where can I find it at. I am using ipowerweb.com as the web provider
Here is the error I am getting?
Fatal error: Call to undefined function: zip_open() in unzip.php on line 6
Thank you for any and all help
PHP Code:
<?php
$zip = zip_open("/tmp/test2.zip");
if ($zip) {
while ($zip_entry = zip_read($zip)) {
echo "Name: " . zip_entry_name($zip_entry) . "\n";
echo "Actual Filesize: " . zip_entry_filesize($zip_entry) . "\n";
echo "Compressed Size: " . zip_entry_compressedsize($zip_entry) . "\n";
echo "Compression Method: " . zip_entry_compressionmethod($zip_entry) . "\n";
if (zip_entry_open($zip, $zip_entry, "r")) {
echo "File Contents:\n";
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
echo "$buf\n";
zip_entry_close($zip_entry);
}
echo "\n";
}
zip_close($zip);
}
?>
here is some info on the server
operating system
FreeBSD 4.9-RELEASE
mysql version
mysql Ver 12.22 Distrib 4.0.18
perl version
perl, v5.8.3
php version
PHP 4.3.4
path to sendmail
/usr/sbin/sendmail
path to perl
/usr/bin/perl
Last edited by CJaiz : 08-02-2004 at 12:33 AM.
|