Solved

Call to undefined function: zip_open()

Posted on 2006-10-22
8
2,453 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
Comment Utility
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
Comment Utility

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
Comment Utility
cat /etc/issue

on the command line.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:dealclickcouk
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

743 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