Solved

Call to undefined function: zip_open()

Posted on 2006-10-22
8
2,466 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

809 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