vivien Posted May 12, 2011 Share Posted May 12, 2011 Im taking my on-the-job. <?php $zip = zip_open("zip.zip"); if ($zip) { while ($zip_entry = zip_read($zip)) { $fp = fopen("zip/".zip_entry_name($zip_entry), "w"); if (zip_entry_open($zip, $zip_entry, "r")) { $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); fwrite($fp,"$buf"); zip_entry_close($zip_entry); fclose($fp); } } zip_close($zip); } ?> my supervisor said that i have a library to add.. im searching on it but i cant find anything.. help pls.. i run this on linux. Quote Link to comment https://forums.phpfreaks.com/topic/236165-why-do-i-get-fatal-error-call-to-undefined-function-zip_open/ Share on other sites More sharing options...
KevinM1 Posted May 12, 2011 Share Posted May 12, 2011 Make an entirely new file called info.php. Place this code within it: <?php phpinfo(); ?> And tell me if you see a listing for the Zip module. EDIT: You'll see this info in your browser if you navigate to info.php Quote Link to comment https://forums.phpfreaks.com/topic/236165-why-do-i-get-fatal-error-call-to-undefined-function-zip_open/#findComment-1214226 Share on other sites More sharing options...
vivien Posted May 12, 2011 Author Share Posted May 12, 2011 is this the one? zlib Zlib Support => enabled Stream Wrapper support => compress.zlib:// Stream Filter support => zlib.inflate, zlib.deflate compiled Version => 1.2.1.2 Linked Version => 1.2.1.2 Directive => Local Value => Master Value zlib.output_compression => Off => Off zlib.output_compression_level => -1 => -1 zlib.output_handler => no value => no value Quote Link to comment https://forums.phpfreaks.com/topic/236165-why-do-i-get-fatal-error-call-to-undefined-function-zip_open/#findComment-1214228 Share on other sites More sharing options...
KevinM1 Posted May 12, 2011 Share Posted May 12, 2011 Nope. There's an actual Zip module which has the zip_open function you're trying to use: http://www.php.net/manual/en/book.zip.php That said, there may be an equivalent in Zlib: http://www.php.net/manual/en/ref.zlib.php Quote Link to comment https://forums.phpfreaks.com/topic/236165-why-do-i-get-fatal-error-call-to-undefined-function-zip_open/#findComment-1214231 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.