how to enable a php extension

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
mmoorree4444
Forum Newbie
Posts: 2
Joined: Thu May 14, 2009 3:18 pm

how to enable a php extension

Post 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
User avatar
Gabriel
Forum Commoner
Posts: 41
Joined: Wed May 06, 2009 8:12 pm
Location: Las Vegas

Re: how to enable a php extension

Post by Gabriel »

Have you read the installation manual from PHP.net?
ldougherty
Forum Contributor
Posts: 103
Joined: Sun May 03, 2009 11:39 am

Re: how to enable a php extension

Post 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
mmoorree4444
Forum Newbie
Posts: 2
Joined: Thu May 14, 2009 3:18 pm

Re: how to enable a php extension

Post 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
Post Reply