Moodle2 Installation Error with Fedora 16: The Zip PHP extension is now required by Moodle



A new installation error when installing Moodle 2, today I was working on Fedora 16 with Moodle 2.2.2+ and received this error on the Package Check Screen

Installation error: The Zip PHP extension is now required by Moodle, info-ZIP binaries or PclZip library are not used anymore.

The trick is that the Zip PHP extension was included in Fedora 15 but not Fedora 16.  There is an interesting discussion thread why.

Not to worry

Sam almost has the instructions right on, there is an assumption he makes without stating that you have php-devel installed, and he has an error in where the PHP modifications go as well as the command with systemd to restart the servers.

Try this

1. Install dependencies as root or using sudo:

yum install pcre-devel gcc zlib zlib-devel

1a. Install php-devel the same way, again as root or using sudo:

yum install php-devel

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

pecl install zip

3. [Modified] Where you used to edit the main PHP configuration file to register the new module, now you create a zip.ini in the /etc/php.d directory.  Copy another one and remove its extension and add this text:;

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

systemctl restart httpd.service

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

This should do the trick.