Page 1 of 1

how to enable a php extension

Posted: Thu May 14, 2009 3:29 pm
by mmoorree4444
Hello I am trying to enable the PHP extension phpzip, I am currently getting the following error. Fatal error: Class 'ZipArchive' not found in... I have to have this particular extension.

From what I have read I just need to go into the php.ini file and add the extension there
extension=php_zip.so
zlib.output_compression = On

I have done this, restarted the server, but different happens. Can somebody offer any help as to fixing this. I have never enabled an extension so I am not sure what I am doing or what else to do.

We are running PHP Version 5.2.4
Linux
Apache 2.0

Thanks
Mike

Re: how to enable a php extension

Posted: Thu May 14, 2009 6:21 pm
by Gabriel
Have you read the installation manual from PHP.net?

Re: how to enable a php extension

Posted: Thu May 14, 2009 7:27 pm
by ldougherty
Have you check to see if the library is in place, look for the file php_zip.so in your extension directory. You should be able to find your extension directory in the php.ini as extension_dir

Re: how to enable a php extension

Posted: Fri May 15, 2009 1:28 pm
by mmoorree4444
Thanks for the replies!

Gabriel, as far as the manual I am not knowledgeable of linux to understand some of this like, "must compile PHP with zip support by using the --with-zip[=DIR] configure option", is this reinstalling php?

ldougherty, I have checked that directory and the php_zip.so file is not in there.

How can I install this? This is where i am running into the problem.

I have also received this email a little earlier from tech support.
You do have the correct PHP version but you need the requirements you listed to be enabled.

So how would I go about enabling them?

mike