Updating PHP (or adding modules)

My first instinct when wanting to add a module to PHP is to hit the shell.  However, in cPanel, this is somewhat harder to do.  Especially as on my CentOS 5.4 x_64 build, yum appears to be broken irretrievably – I’ve installed the EPEL repo, but cannot select any software to install from it (I was after the php-mbstring package, I understand).

However, cPanel to the rescue.  Hit WHM as your root user, and go to “Software”.  In there, is an “Easy Apache” section.  Go through the “wizard” presented, and fill in the details you want (I’d base the settings on the existing build if I were you).  In step 5, use the “exhaustive options list” and select all the modules you want.

Having filled in the configuration filename, description and extended description boxes, push the “build” button and let cPanel chunter away for a bit.  You’ll then be asked about suExec and default PHP handlers for .php types.  Accept the defaults (or the settings you had last time if you’re conservative, although for me, these were the same) and away you go.  I’ve now got mysqli and mbstring (why aren’t these default modules anyway?) installed on the server.  No yum needed, Hurrah!

Leave a Reply