Sun Jun 26 21:05:02 EEST 2011

How to install mysqli php support in Cpanel on (CloudLinux Server 5.6) with easyapache

Mysqli module

One of the Cpanel servers I manager running on CloudLinux Server release 5.6 was missing mysqli support in php .

A client complain was issued to fix it up, e.g. install mysqli module support in the php
The server running PHP version is 5.3.6, I did quite an extensive investigation on how this can be achieved and since I found not a good way to install the mysqli through CPANEL's web management interface, I started looking ways to precompile php directly logging via ssh on the server.

After quick look on the server I've found a bunch of management scripts in server root's /scripts/ directory.
The scripts directory contains 626 really handy administration scripts which really aids and easifies many of the system administration tasks one has to do on Cpanel powered server.

Among the scripts list I've noticed the /scripts/easyapache which could be used to update the libPHP running version on the server to the latest release as well as precompile and update the Apache from source code to the latest issued Apache release on httpd.apache.org .

easyapache proofed to be dead easy, to add up the mysqli php extension to server included php, I had to:

Execute /scripts/easyapache root@hosting-server1 [~]# /scripts/easyapache


First message which "greeted" me after I launched the easyapache script was:
There were errors registered during the last build. Would you like to review them before proceeding? ;)
I just ignored the message and pressed Yes
Next an ncurses screen appears explaining what exactly the last time compile issue that emerged was, once again I just ignored the msg.

Next it's necessery to be selected the exact easyapache configuration profile to be used for the further source compile, here I used:
Previously Saved Config (** DEFAULT **)

EasyApache load profile screen

Next an Apache version to be used by easyapache during compile needs to be choosen I choose Apache 2.2 as this is the Apache version which I would like to be compiled by the script.
Please Choose Apache EasyApache

Further on I pressed the [Next Step] here.

Two other screens appears asking if one PHP4 or PHP5 needs to be compiled, in my case that was php5, next I choose the latest php version which appeared as a possible option that's php 5.3.6

Please Choose PHP EasyApache

After this selection, the Short Options List screen appears, to select Mysqli module one needs to select on the [Exhaustive Options List] and from the list that is displayed to choose Mysql Improved Extension
Short Options List screen EasyApache