Reply to php zip code will NOT work on my WinXP Pro IIS installtion!!

Your name:

Reply:


Posted by Laphan on 12/02/06 21:39

Hi All

Please, please help.

I'm not completely thick, but php terminology for getting and installing
extensions is soooo confusing to me.

All I want to do is use the following code:

<?php
$zip = new ZipArchive;
if ($zip->open('test.zip') === TRUE) {
$zip->extractTo('/my/destination/dir/');
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>

But when I run it I keep getting:

Fatal error: Cannot instantiate non-existent class: ziparchive in C...

If I take out the '$zip = new ZipArchive;' line I get:

Fatal error: Call to a member function on a non-object in C...

Standard php code works fine in my IIS server, but this just won't have it.

I downloaded the correct (I think) php_zip.dll for my php 4.4.2.2
installation (I need to keep to v4), put it in the extensions folder (which
works cos I have mysql extens working from here), permissions are right and
I've been in the php.ini to uncomment the extension=php_zip.dll line, but I
still get these bloody errors!

I've done the php info page and I get:

zip
Zip support enabled

zlib
ZLib Support enabled
Compiled Version 1.2.3
Linked Version 1.2.3

DirectiveLocal ValueMaster Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

Is this extract feature only available to php 5 users?

How do I get the equivalent in php 4? All I want to do is extract the whole
contents of 1 zip file and put the extracted contents, should be a folder
containing various files, into another folder.

Aaaarrrggghhh!!

Please help.

Thanks

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация