Hello,
I need the ability to manage zip files from PHP.
Do you know the ZIP package to install ?
Do we absolutly have to compile php from source to add something like with-zip=
Thanks for your help
Pascal
Hello,
I need the ability to manage zip files from PHP.
Do you know the ZIP package to install ?
Do we absolutly have to compile php from source to add something like with-zip=
Thanks for your help
Pascal
You’ll need zip and/or zip-devel most likely Pascal, and you will have to recompile from source. I’d just take the 4.3.11 SRPM and use it as your base, it’ll make the process much easier than doing it from scratch.
Chris
Thanks Chris.
The zip and zip-devel may be found in the PECL web site ? I only know the Zziplib. What is the zip-devel ? isn’t it a perl module ?
Also does gzopen couldn’t open a zip file ?
Or is there in PEAR a zip class ? in this case I won’t have to recompile the php as I think it is already compiled with-pear.
And last you’ll be very cool if you could provide me an example or a little howto to take the 4.3.11 SRPM as my base and recompile from it PHP
Thanks
Pascal
Do you need zip access or access to gzopen Pascal? gzopen is part of zlib which is included in the default IWorx-CP RPM.
The zip packages should be installable via YUM (yum install zip).
Get back to me on that 1st point and if you still need the zip functions (not gzopen) I’ll walk you through the recompile.
Chris
It’s the zip not gzopen,
(but I’ve seen some php classes that read some .zip and .gz using gzopen / zlib files : so I’ve been a little disapointed)
Also maybe it could be more easy to use http://www.phpconcept.net/pclzip/index.en.php or or the pear zip.php class and not to have to recompile php ?
The zip packages should be installable via YUM (yum install zip).
Hmmm ? are you sure the zip package is the php library ? I already have a zip package installed on my box but I don’t think it is the php one ?
zip i386 2.3-16.1 db
Thanks for your help Chris
Pascal
Get back to me on that 1st point and if you still need the zip functions (not gzopen) I’ll walk you through the recompile.
Ok I have downloaded the zziplib and zziplib-devel,
zziplib-0.13.38-1.1.el3.rf.i386.rpm
zziplib-devel-0.13.38-1.1.el3.rf.i386.rpm
I"ve found the SDL and SDL-devel package in YUM but not zziplib nor zziplib-devel
now I’m ready to change the php RPM to recompile it with with-zip=
I’ll do this :
rpm -Uvh http://updates.interworx.info/iworx/SRPMS/php-4.3.11-100.iworx.src.rpm
then update the SPECS file
-to change the Bversion to 101
-to add the with-zip option
Do I have only to add under the ./configure line
the option --with-zip= \
I’m not sure if I have to define the directory or not with --with-zip=[dir]
Indeed I have only these zziplib directory after having installed the rpm
/usr/share/aclocal/zziplib.m4
/usr/share/zziplib
/usr/share/zziplib/SDL
/usr/share/zziplib/SDL/SDL_rwops_zzip.c
/usr/share/zziplib/SDL/SDL_rwops_zzip.h
/usr/include/zziplib.h
/usr/lib/pkgconfig/zziplib.pc
Which one I have to enter after --with-zip=
/usr/share/zziplib ?
I imagine that the build action will try to find a C programm ? something like zziplib.c isn’t it ? but I can’t find it
Anyway
then
rpmbuild -bb --with cos3x /usr/src/redhat/SPECS/php.spec
And finally
rpm -Uvh php-4.3.11-101.iworx.src.rpm
do I have also to Upgarde all other php-xxx rpm generated by the rebuild from spec ?
php-devel-4.3.11-100.cos3x.iworx.i386.rpm
php-domxml-4.3.11-100.cos3x.iworx.i386.rpm
php-imap-4.3.11-100.cos3x.iworx.i386.rpm
php-ldap-4.3.11-100.cos3x.iworx.i386.rpm
php-mbstring-4.3.11-100.cos3x.iworx.i386.rpm
php-mcrypt-4.3.11-100.cos3x.iworx.i386.rpm
php-mhash-4.3.11-100.cos3x.iworx.i386.rpm
php-mysql-4.3.11-100.cos3x.iworx.i386.rpm
php-ncurses-4.3.11-100.cos3x.iworx.i386.rpm
php-odbc-4.3.11-100.cos3x.iworx.i386.rpm
php-pear-4.3.11-100.cos3x.iworx.i386.rpm
php-pgsql-4.3.11-100.cos3x.iworx.i386.rpm
php-snmp-4.3.11-100.cos3x.iworx.i386.rpm
php-xmlrpc-4.3.11-100.cos3x.iworx.i386.rpm
But I’m not sure what I have to update in the php.spec file
Could you please confirm me this is ok and/or give me a biref howto to perform this chris
Thanks
Ok apparently everything is fine :
Now I have zip support enabled. I just have to test it now
http://www.carat-hosting.com/phpinfo2.php
Also, I have installed ALL rpm generated
Pascal
I have tested the ZIP finctions and it works great
Thanks Chris to gave me the idea to use the SPEC file
Pascal
Google found this thread in the forums graveyard
Is there a php package that I can install now like I have with other addons?
like yum install php-zip?
Unfortunately no Justec :(. You’ll have to recompile as Pascal did to get it working.
Chris
Thanks for the quick reply Chris… Decided to just go with system(“unzip file”) since I just needed to unzip a file.