3

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?

David W
  • 3,453
  • 5
  • 36
  • 62
  • This question appears to be off-topic because it is about [`working with a service provider's management interface, such as cPanel`](http://serverfault.com/help/on-topic). – HopelessN00b Jan 13 '15 at 21:39

2 Answers2

0

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!

David W
  • 3,453
  • 5
  • 36
  • 62
0

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).

justlovingIT
  • 475
  • 3
  • 11