Reply
unziping a file
Old 08-01-2004, 11:35 PM unziping a file
Junior Talker

Posts: 4
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_entryzip_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.
CJaiz is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 08-02-2004, 05:33 PM
Novice Talker

Posts: 14
if the php manual says u need the lib to use the function then you should ask the host if they could install it on the server for you. As your a paying customer they should do that for you.

I dont know of any other ways to unzip things on the server.
__________________
http://www.blueprog.com <-- For help and discussion with web and computer coding
lotrgamemast is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to unziping a file
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12416 seconds with 12 queries