Solved

Call to undefined function: zip_open()

Posted on 2006-10-22
8
2,460 Views
Last Modified: 2013-12-13

Hi

I wrote a php script that downloads and extracts gz and zip files from a remote server and then unzips them.

I had been dev and testing them on a windows box with php and all worked great, however now that I want to go live with this on a linux server with php version 4.4.1 I get error: Call to undefined function: zip_open()

From what I've read I need to install some librarys on my linux server (dedicated managed remote server).

Unfortunatly this is where my knowledge falls down, as really I'm a PC guy a *nix admin and installation is just not my bag.  If someone could provide me with some idiot proof install instructions to get past this error that would be way cool.

Thx
0
Comment
Question by:dealclickcouk
  • 3
  • 2
8 Comments
 
LVL 8

Expert Comment

by:Rytmis
ID: 17790794
Depends a great deal on what distro you're running and how you installed PHP in the first place (distro package or compiled from tarball).
0
 

Author Comment

by:dealclickcouk
ID: 17793916

ok, thx, how do I find out what distro I have?

I have a phpinfo() thing setup so I can see all the setting, if you tell me what to look for I can post back the info.
0
 
LVL 8

Expert Comment

by:Rytmis
ID: 17794049
cat /etc/issue

on the command line.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:dealclickcouk
ID: 17800012
Rytmis - I did as you asked and got the following:

/root$ cat /etc/issue
Red Hat Enterprise Linux ES release 3 (Taroon Update 3)
Kernel \r on an \m

Hope that helps, if you would like me to do something else please let me know.

Thx
0
 
LVL 8

Accepted Solution

by:
Rytmis earned 125 total points
ID: 17802344
I can't seem to find a php-zip package for Red Hat (I've got a CentOS server which is basically RHEL without the branding and it's not there either), and looks like it's not compiled in the default PHP package.

You could of course try compiling PHP from source yourself, but seeing as you're not too fluent in *nix, that's more likely to just frustrate you than yield results.

I'm sorry, looks like I can't help you here. I hope someone more intimately familiar with RHEL knows where to get it.
0
 
LVL 12

Assisted Solution

by:adrian_brooks
adrian_brooks earned 125 total points
ID: 17810296
I use FreeBSD, but they are both similar in numerous respects.

Have a look at this link. It may provide you with further details about your zip failure.
http://us2.php.net/manual/en/ref.zip.php

What I found on the php.net site was this;

Installation on Linux
Installation when bundled with PHP4
In order to use these functions you must compile PHP with zip support by using the --with-zip[=DIR] configure option, where [DIR] is the prefix of the ZZIPlib library install.


My guess is that your remote server does not have this library enabled when they installed their version of PHP. This would be something that I would consult with that service's tech support about to see if they can implement that into the PHP installation since I doubt they would give you access to such things.

I hope this has been helpful for you.

Best of luck :)

~AB
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now