473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
Dec 2 '06 #1
2 2325
Laphan wrote:
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.
Visit http://www.php.net/zip and scroll down to the fourth example.
JW
Dec 2 '06 #2

"Janwillem Borleffs" <jw@jwscripts.comwrote in message
news:45***********************@news.euronet.nl...
Laphan wrote:
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.
Visit http://www.php.net/zip and scroll down to the fourth example.
JW
>
Many thanks for your speedy and helpful reply JW

This one does seem to work, which is great, but I need assistance on getting
it to work in the way that I need.

Basically I will have a zip file on the server and this zip file consists of
one main folder (the user zips a folder) and inside that you have a min of 3
sub-folders then a number of jpgs, gifs and css files in each of these
sub-folders. All I want to do is extract the zip and get the folder (and
it's sub-folders/files inside it) sat in the same directory as the zip file.
I can then take it from there.

The ExtractTo command seems perfect, but also doesn't appear to work in php
4.

Any ideas?

Thanks

Dec 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tommo | last post by:
Hello All, I am a still learning so be easy on me. I am trying to get some code to work that is using JS and Perl/CGI, I am using AS Perl and an Apache Server on XP as the webserver. Can anyone...
1
by: Marlon | last post by:
<! -- Web.config--> <authentication mode="Windows" /> <identity impersonate="true" /> <! -- Web.config--> where Configurations.ADsUsersPath is...
2
by: Rhys.Mataira | last post by:
My code will not show up anything at all on the screen can someone guide me why this would be? <?php $pagetitle="Login"; If (!$_POST) or (!$_POST) { echo" <head></head> <style...
2
by: Money | last post by:
When we do this Test *ptr=new Test; then runtime memory manager will allocate 10*sizeof(Test) + X bytes(X varying from implementation to implementation) But instead if I call operator new...
4
by: alice | last post by:
I'm trying to get sounds to play on image mouseovers using dreamweaver 8, and I found out that the code it generates to do this only works for IE. Is there a way to do this so that it will work...
3
by: SM | last post by:
I'm using simpleXML in PHP and i Can't get this small piece of code to work? Need help I have an XML that looks like this: <?xml version="1.0" encoding="utf-8"?> <VIDEO> <item>...
1
by: Bergamot | last post by:
marss wrote: You may be trying to fix the wrong problem. Post a URL, then maybe we'll see a better way to accomplish whatever your goal is. -- Berg
16
by: DavidGeorge | last post by:
I have an unbound form with three list boxes. The selections made in these list boxes 'filter' the records that appear in an unbound subform. The subform record source is a query which looks at...
5
by: Die Klein | last post by:
ive been trying to get this code to work for a few days now, but i dont know what im doing wrong :S im basicaly trying to create a login that will allow members to login to their details. the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.