Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been tasked with a project to install PHP 5.2.x so that it has the ZIP extension onto a CentOS server that is already running PHP via cPanel / Easy Apache. Apparently cPanel's version of PHP can't support the ZIP extension natively (can someone confirm whether or not this is true?) and I asked about installing the extension with PECL, and they said from what they could tell, PHP needs to be recompiled (I'm doubtful that this is the case though - and would be surprised if I can't do this with PECL on the existing PHP installation).

I'm real hesitant to manually re-compile PHP on a cPanel system for obvious reasons - making future upgrades that much harder to deal with, and making it difficult to tie cPanel into the manually compiled version of PHP (so that it no longer tries to manage PHP with easyapache).

Furthermore, this organization that has given me this task doesn't have a real system administrator - so obviously it would just complicate things for them as well.

So... I ask the community: Have you ever gotten the ZIP PHP extension to work on a cPanel server? Should I pursue doing this with PECL? If not, is there a way I can install PHP with Yum and then configure cPanel / Apache to work with Yum's version of PHP? Or should I indeed (shudder) attempt to do all of this manually?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

I finished doing the upgrade last night after poking at the system a little bit yesterday and the day before to "get to know" it a little and refresh my memory of a few things on the server (as I've worked on it quite a bit in the past).

It turns out that Easy Apache does support the ZIP extension, and Apache / PHP (re)-compiled just fine. In this case, I did a minor PHP upgrade as well, from 5.2.14 to 5.2.16. Everything seems to be working fine, and zip is now an option!

share|improve this answer

You can compile this with EasyApache or use cPanel's PECL installer. Both has worked very well for us.

Side note: On a cPanel server it's always desirable to use the tools shipped with cPanel/WHM to avoid trouble during version upgrades/upcp.

Furthermore when using a PHP stack compiled by EasyApache you should check EA for updates regularly and do a recompile if neccessary. Without this you risk missing serious security fixes for PHP and other modules.

In case you need a module that's not supported by EasyApache I'd always go for PECL instead of recompiling PHP by hand (at least on a cPanel server).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.