Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Call to undefined function: zip_open()

Posted on 2006-10-22
8
Medium Priority
?
2,539 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
6 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 500 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:Richard Davis
Richard Davis earned 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
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 a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

876 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