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

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

by A A -
Number of replies: 6

How do I fix this problem?

I'm using Moodle 2.2.1+ (Build: 20120119)

32-bit Amazon Linux on EC2 (using this installation document)

NameInformationReportStatus
php_extension zip must be installed and enabledmust be installed and enabled

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

Check
Average of ratings: -
In reply to A A

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

by Brian Lockwood -

You are missing a php library. Probably php-pecl-zip. Luckily, as a linux user you can use the software install facility to get it from a repository. I am not familiar with Amazon linux but it will probably have a software update feature in the admin gui somewhere. You can use whatever software update "Amazon" Linux provides to find it and install it. You have to get the name of the package right so search first

All the following has to be done as root via sudo or su. If you need to know more, ask.

If you have to use the cli 

Ubuntu-Debian based Linuxes use apt

apt-cache search <search key>  to find thing
apt-get install <name of pkg> to install them
e.g.  apt-get install php-pecl-zip

RH-Fedora based Linuxes use  yum or older ones use rpm.

yum search to find
yum install <name of pkg> to install 

e.g. yum install php-pecl-zip

 

It will not do any harm to have libraries in that you are not using if you get the libray wrong the first time and have to add more but

apt-get remove <name of pkg>

yum remove <name of pkg>

remove unwanted packages.

In reply to Brian Lockwood

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

by A A -

Since following the installation instructions for EC2, I did run yum earlier. However, based on your comment above, I ran the yum install php-pecl-zip and here's the message I get:

Package matching php-common-5.3.8-3.20.amzn1.i686 already installed. Checking for update.
Nothing to do.

In reply to A A

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

by Brian Lockwood -

I run Fedora in various versions and the thing is that each set of repositories are mainatained by a different set of packages. 

You can add different repos to different versions but it is usually a bad idea unless you know what you are doing.

Your RH/centos derived Linux may be missing the particular php extension you need from its repos. The only thing I can suggest for the moment is to use yum search to try and identofy the correct thing you need to add.

Which precise EC2 package have you got?

In reply to Brian Lockwood

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

by A A -

I'm using this free-for-one-year deal they recently offered.

Basic 32-bit Amazon Linux AMI 2011.09 Amazon Linux AMI 2011.09, EBS boot, 32-bit architecture with Amazon EC2 AMI Tools. Root Device Size: 8 GB

I am not comfortable changing things unless I have good instructions. I thought I did pretty good by following installation instructions, but apparently I am stuck with something that appears to be a minor issue but it wouldn't let me finish the installation. smile
In reply to A A

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

by Brian Lockwood -

OK. I got myself an EC2 and had a go, got the same problem.

The issues is a problem with the package php-common in that it says it provides zlib.so and it doesn't.

Try the following to see that the package claims to provide zip.so

yum provides zip.so

I have been and fetched the appropriate rpm for the same architecture and extracted the zip.so and attached it to this post. If the attachments doesn 't get to the post then DM me.

Once you have the zip.so you will need to upload it to your ec2. I assume you have figured out things like that as you managed to get your moodle onto your platform. FYI I used git.

It (zip.so) needs to go in /usr/lib/php/modules

Also you need to add

extension=zip.so

to your php.ini (in /etc)

restart httpd (service httpd restart)

and that should be OK, it was for me.

I had to add the following as well (some of these from memory)

php-xml

php-zts
php-intl

php-soap
php-xmlrpc
php-mbstring
php-mysql
php-gd
php-mcrypt
php-memcache
php-memcached

 

Happy mooooooodling

[Edit] BTW, the rest of the install went OK. I finished after posting. I also made an error on the line extension=zlib.so in my original post. (Now fixed).
 

In reply to Brian Lockwood

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

by Brian Lockwood -

BTW and FYI ...

To test a moodle and get some mind of Internet hosting for free, Amazon EC2 is pretty good.

So far as I can tell, you would need a non free package to get reliability for a large scale "Live" moodle with users an all.