LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-06-2012, 10:40 AM   #1
phpdev
LQ Newbie
 
Registered: Nov 2011
Posts: 14

Rep: Reputation: Disabled
Install ZIP extension for php on CentOS


Hello,

I am trying to install zip extension work with php on linux. But i got error "Call to undefined function zip_open()"

I did:

Installed zziplib-0.13.59
Installed zip-1.10.2

Now i do not understand how to configure it with php and make it work.
And one more thing i can not view /usr/lib64 folder using ftp tool. directory is there but i can not open it.

Any help will be appreciated.
Thank you
 
Old 01-06-2012, 11:21 AM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Probably you need
Code:
php-pecl-zip : A zip management extension for php
do the search with yum first:
Code:
# yum search zip
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: ftp.xxx.si
 * centosplus: ftp.xxx.si
 * epel: ftp.upjs.sk
 * epel-debuginfo: ftp.upjs.sk
 * epel-source: ftp.upjs.sk
 * epel-testing: ftp.upjs.sk
 * epel-testing-debuginfo: ftp.upjs.sk
 * epel-testing-source: ftp.upjs.sk
 * extras: ftp.xxx.si
 * remi: remirpm.mirror.gymkl.ch
 * remi-test: remirpm.mirror.gymkl.ch
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: ftp.xxxx.si
2093 packages excluded due to repository priority protections
=========================================================== Matched: zip ===========================================================

p7zip.i386 : Very high compression ratio file archiver
p7zip-debuginfo.i386 : Debug information for package p7zip
p7zip-plugins.i386 : Additional plugins for p7zip
php-pecl-zip.i386 : A zip management extension for php
php-pecl-zip-debuginfo.i386 : Debug information for package php-pecl-zip
php-zipstream.noarch : Streaming dynamic zip from PHP without writing to the disk
pigz.i386 : Parallel implementation of gzip
poco-zip.i386 : The Zip POCO component
then install it:
Code:
# yum install php-pecl-zip
good luck

Last edited by lithos; 01-06-2012 at 11:22 AM.
 
Old 01-06-2012, 11:34 AM   #3
phpdev
LQ Newbie
 
Registered: Nov 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thank you for answer

This is what i got on search.
I already tried this , it says no package php-pecl-zip.


<code>
yum search zip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.trouble-free.net
* extras: mirror.7x24web.net
* updates: mirror.net.cen.ct.gov
================================= Matched: zip =================================
mc.x86_64 : User-friendly text console file manager and visual shell
perl-Archive-Tar.noarch : A module for Perl manipulation of .tar files
kdeutils.x86_64 : K Desktop Environment - Utilities
bzip2.x86_64 : A file compression utility.
bzip2-devel.i386 : Header files and libraries for developing apps which will use
: bzip2.
bzip2-devel.x86_64 : Header files and libraries for developing apps which will
: use bzip2.
bzip2-libs.i386 : Libraries for applications using bzip2
bzip2-libs.x86_64 : Libraries for applications using bzip2
eject.x86_64 : A program that ejects removable media using software control.
gzip.x86_64 : The GNU data compression program.
java-1.4.2-gcj-compat-src.x86_64 : Source files for libgcj
libgsf.i386 : GNOME Structured File library
libgsf.x86_64 : GNOME Structured File library
mikmod.i386 : A MOD music file player.
mikmod.x86_64 : A MOD music file player.
mono-core.x86_64 : The Mono CIL runtime, suitable for running .NET code
ncompress.x86_64 : Fast compression and decompression utilities.
perl-Archive-Zip.noarch : Perl library for accessing Zip archives
perl-Compress-Zlib.x86_64 : A module providing Perl interfaces to the zlib
: compression library.
perl-String-CRC32.x86_64 : Perl interface for cyclic redundency check generation
unzip.x86_64 : A utility for unpacking zip files.
xarchiver.x86_64 : Archive manager for Xfce
xz.x86_64 : LZMA compression utilities
zip.x86_64 : A file compression and packaging utility compatible with PKZIP.
zlib.i386 : The zlib compression and decompression library.
zlib.x86_64 : The zlib compression and decompression library.
zlib-devel.i386 : Header files and libraries for Zlib development.
zlib-devel.x86_64 : Header files and libraries for Zlib development.

</code>

Mine php is 5.1.6.
Where can i find ./configure to config --with-zip?

Last edited by phpdev; 01-06-2012 at 11:36 AM.
 
Old 01-06-2012, 11:38 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,114

Rep: Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489
# 1

PHP must be compiled with --enable-zip, to create zip.so .


There is no zip.so in the default php(-common) for CentOS.

php53 : zip.so is provided by the package php53-common :
/usr/lib64/php/modules/zip.so

php-5.2.xx, the Jason Litka repo http://www.jasonlitka.com/yum-repository/
>>> zip.so : php-common.

EDIT : Finding packages : # yum provides */zip.so

.

Last edited by knudfl; 01-06-2012 at 11:41 AM.
 
Old 01-06-2012, 12:03 PM   #5
phpdev
LQ Newbie
 
Registered: Nov 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
this is what i got on php-pecl-zip

yum install php-pecl-zip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.trouble-free.net
* extras: mirror.trouble-free.net
* updates: mirror.net.cen.ct.gov
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php53-common.x86_64 0:5.3.3-1.el5_7.3 set to be updated
--> Processing Conflict: php53-common conflicts php-common
--> Finished Dependency Resolution
php53-common-5.3.3-1.el5_7.3.x86_64 from updates has depsolving problems
--> php53-common conflicts with php-common
Error: php53-common conflicts with php-common
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
 
Old 01-06-2012, 12:46 PM   #6
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
This is updating to PHP v 5.3 and
since still PHP 5.1.6 is installed,
you can't install v5.3.

First try upgrade to 5.2.17 from webtatic repo.
But beware to follow instructions at near bottom of page under section PHP 5.2.17

Last edited by lithos; 01-06-2012 at 12:48 PM.
 
Old 01-06-2012, 12:57 PM   #7
phpdev
LQ Newbie
 
Registered: Nov 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
thank you to answer.

i will install new version of php on new server.
and will see if it works.

thank you again to all.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] OpenSSL PHP extension have to be enabled to use extension repository system. jsaravana87 Linux - Server 2 09-09-2011 01:00 AM
[SOLVED] install zip extension using pear jonniebigodes Linux - Software 2 10-27-2010 12:41 PM
PHP ZIP MYSQL - open zip without writing it to disk benjalien Programming 2 01-15-2010 06:14 AM
php pear/pecl zip extension slackamp Slackware 1 06-11-2007 09:55 PM
How to install php extension? strangevarius SUSE / openSUSE 0 04-11-2007 07:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration