Jump to content

Zip function problem


psycoprogrammer

Recommended Posts

I'm working with php5 on a windows box and I'm trying to read a file from a zip using zip_open. However, when i run the script, I a "call to undefinied function zip_open" error. I've enabled the extension=php_zip.dll line in my php.ini file and the only thing i can think of is that i need zziplib to be installed. I've googled how to do that on a windows machine for many fruitless hours. Also, here's what my code looks like:

$file = "output.txt";
$tax_file = "RMKR602A.ZIP";

$fh = fopen($file, 'a');
$unzip = zip_open($tax_file);
$zip_entry = zip_read($unzip);

if (zip_entry_open($unzip, $zip_entry, "r")){
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
fwrite($fh, $buf);
} else {
echo "file not opened or read";
}

fclose($fh);
zip_entry_close($zip_entry);

And like i said, the error is when i try to do $unzip = zip_open($tax_file);

Any help on how to get this working by either installing zziplib on windows or changing some of the configuration would be greatly appreciated.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.