:::: MENU ::::

Install zip module php-zip on Fedora 16

Due to an issue with the packaging of zip functionality within Fedora’s PHP package, the yum package php-zip, which was available for Fedora 15, is not available in Fedora 16. This is actually a “feature”, not a “bug”, but either way, getting zip support in PHP now takes a few extra steps.

1. Install dependencies as root or using sudo:

yum install pcre-devel gcc zlib zlib-devel

2. Install zip module using PECL (PEAR‘s sister):

pecl install zip

3. Edit the main PHP configuration file to register the new module. Add this text:

extension=zip.so;

a few lines before this:

Module Settings

in /etc/php.ini, as root or using sudo, like this:

nano /etc/php.ini

4. Restart your web server as root or using sudo:

service httpd restart

5. Check that support is enabled using phpinfo(). You should have a section on your phpinfo() page that looks like the image below.

Screenshot of zip support shown on phpinfo() page

Zip support confirmed by phpinfo()

That’s it, good luck ๐Ÿ™‚


3 Comments

  • Reply JR |

    Thanks so much – just saved me a lot of hassle installing e-front on my desktop.

    I needed to install php-devel as well to get it to go – which pecl told me when I tried to install zip with it. Other than that – it went perfectly.

  • Reply joas |

    thanks for your article. it helps me. you should add that to use pecl one must have installed php-pear before.

So, what do you think ?