Installing MySQLnd in your cPanel server !

You might want to install the the MySQL native driver for PHP (MySQLnd) over the custom MySQL driver provided with the default EasyApache.

To enable this manually, you will need to edit the file :

/var/cpanel/easy/apache/rawopts/all_php5 and make sure the following entries are in place there :


Save the above file, run EasyApache from WHM and recompile as normal.


Fix – “Cannot load from mysql.proc, The table is probably corrupted”

For someone who upgraded MySQL from versions 5.0.x to something like 5.5.x, this error might be a familiar one :

“Cannot load from mysql.proc. The table is probably corrupted”

The database activities would not work as expected and hence you will need to fix this error at the earliest.

The recommended solution from MySQL is to run the mysql_upgrade script which examines all tables in all databases for incompatibilities with the current version of MySQL Server.

mysql_upgrade also upgrades the system tables so that you can take advantage of new privileges or capabilities that might have been added.

You can do this by :

# mysql_upgrade -u root

If you are using a cPanel based system, just run

# mysql_upgrade

To force the check, run

mysql_upgrade --force

Does this result in an error ? “”FATAL ERROR: Upgrade failed””

Look for the logs when this happens and try to spot if some invalid db folders are getting listed during the upgrade.

It might be something like :

mysqlcheck: Got error: 1102: Incorrect database name ‘#dbname#.bk’ when selecting the database

The above error indicates you have an invalid db under the mysql dbs folder, usually – /var/lib/mysql.

Navigate to /var/lib/mysql and find if there are any folders with any extension ( keep only valid db folders and move everything else, like backed up files or so from there )

Once this is complete, re-run the mysql_upgrade script !


Issue with horde in Plesk : Attachments not going through !

Once the Plesk panel gets updated to 11.5.x , the horde gets an upgrade as well : to horde 5.

On horde 5, there might be a weird issue in which mails would be sent out fine,  but any attachments would not be. You will not see any errors or warnings, however, the attachments will not be received at the other end.

The issue was , the temporary directory of horde had the wrong ownership of apache:apache. Change this to horde_sysuser:horde_sysgroup and things will be fine.

First check the location of temporary horde directory :

# grep -i tmpdir  /usr/share/psa-horde/config/conf.php

Most of the cases, it should be /tmp ( the default value )

# ls -la /tmp/ | grep .horde

Find the ownership of .horde and check if its apache:apache

Change it to :

# chown -R horde_sysuser:horde_sysgroup /tmp/.horde/
This should solve the problem with attachments !



Issue with r1soft backup agent !

Last day, got an issue which prevented a backup node to take the regular backup’s of a server which was already configured and working well.

The error which showed in backup node was :

Remote host unexpectedly closed the connection

Tried to stop the agent service running in the server and the error now obtained showed : “Connection refused

This meant that there was connections going through initially between the backup node and the concerned server, but somehow connection wasn’t getting established. Made sure the ports are opened and are listening in the server.

A quick grep on /var/log/messages showed the following :

Date hostname buagent: Was unable to create shared memory for log buffer

On checking the /etc/buagent/agent_config file, could see the CacheDir variable was set to : /var/cache/buagent

On trying to cd into the directory, was facing the error, ‘lots of symbolic links created’ and this error was preventing to enter in.

Removed the symlinks which is really not needed , re-created the folder/var/cache/buagent and attempted a backup task, bingo ! All good !!





Getting an empty /etc/userdomains file ?

Even though you have several domains, do you see an empty /etc/userdomains file ? This issue can pop up at times when your disk space gets filled up and the cPanel services malfunction. All you need to do is to update the cPanel domain- config files. This can be done by the script :

# /scripts/updateuserdomains

Now, you will be able to see the domains listed !


cPanel – Install Nginx + Varnish alongside Apache !

Nginx is a very fast webserver when compared with the default Apache offered by cPanel. Nginx is known for its high performance and low resource consumption. Servers hosting WordPress sites are employing Nginx as it improves the performance.

Nginx will work as a front end reverse proxy of your cPanel server along with apache, which will increase the performance. We have a plugin called ‘Nginx Admin’ which is a cPanel Nginx integration plugin.

Use the following steps to install it on a cPanel server :

1 ) Download the source files :

# cd /usr/local/src
# wget
# tar xf nginxadmin.tar
# cd publicnginx

2) Generate a Remote Access Key.

Generate a key by logging into WHM, going to Clusters, then Remote Key Access, and then clicking Generate New Key.

3) Run the script

# ./nginxinstaller install

This Nginx installation method integrates with WHM/cPanel and uses the Apache configuration files that WHM/cPanel uses by default.

After installation you can go to WHM, Plugins, and Nginx Admin to handle Nginx. From there you can restart Nginx, edit the configuration files, view logs, and more.

You can also restart Nginx on the command line with the Apache command:

# /etc/init.d/httpd restart

Now lets move ahead with the installation of Varnish.

Varnish is a caching technology known as web accelerator which is used as reverse HTTP proxy, which will enhance the performance of your website.

Varnish stores a copy of the page which is served by the web server the first time a user visits the website. Next time, when the user requests for the same page, varnish will serve the copy instead of serving it from the web server. Thus, your webserver is seldom bought into the lime-light if the used pages are being fetched, which improves the performance.

Before moving ahead, we will bind our webserver to the port 8081, in the file – /usr/local/apache/conf/httpd.conf,

Change the Portion – Listen to Listen and restart the webservice.

Now, lets download and install the Varnish !

1) Add the repo : ( check the version of your OS ) : the URL given below is for CentOS / Redhat 5.x versions :

# wget

# rpm -Uvh varnish-release-3.0-1.noarch.rpm

2) Install the service :

# yum install varnish

3) Edit the configuration file for varnish – /etc/sysconfig/varnish and change the value of VARNISH_LISTEN_PORT to 80

# grep VARNISH_LISTEN_PORT /etc/sysconfig/varnish
4)  Edit Varnish config: /etc/varnish/default.vcl . Correct the backend default Port to reflect – 8081 ( the port to which webserver was bind to )

backend default {
.host = “YOUR IP ADDRESS”;
.port = “8081”;

5) Start Varnish service on your server

# chkconfig varnish on

# service varnish start

You are done with installing Nginx and varnish in your cPanel server, which should improve your speed and performance.


cPanel – Installing Memcached !

Caching mechanisms are always useful to improve the speed and performance of the services being provided. Especially when you have dynamic webpages that are required to be loaded up, caching mechanisms, if enabled can be used to load the pages up quickly without bottle-necking the server.

Memcache(d) – | ‘d’ for daemon |  is an open source caching method used to speed-up webpages and its parsing.

Steps to install it on a cPanel based server is given below :

# yum install memcached ( ensure the EPEL repo’s are enabled ) : help needed on this ? Check this third-party link

# service memcached start – start the service.

# pecl install memcache – Install PHP memcache.

Now, make sure the memcache module is referenced in the php.ini file. If not, add the memcache extension in php.ini file.

# echo "" >> /usr/local/lib/php.ini

# service httpd restart

# chkconfig --levels 235 memcached on : To ensure memcached will be up even after a server reboot:

# php -m | grep memcache – check if you are good to go !

You can find the configuration file at –  vi /etc/sysconfig/memcached

Dont forget to open the port in your Firewall !


cPanel – Install Google mod_pagespeed module for Apache

“mod_pagespeed is an open-source Apache module created by Google to help Make the Web Faster by rewriting web pages to reduce latency and bandwidth” –

To incorporate this module to your Apache webserver in a cPanel running server, do the following steps :

Note : This is meant for Apache 2.2.x versions.

1) Clone the installation scripts to the server :

# /usr/local/cpanel/3rdparty/bin/git clone /tmp/pagespeed/

2) Create a tar.gz custom_opt_mod for EasyApache script to be detected :

# cd /tmp/pagespeed/Easy
# tar -zcvf pagespeed

3) Move the custom mod to the place which is scanned by EasyApache ( create that folder, if not already present ) :

# mv -t /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy/

4)  Remove the cloned script from /tmp

cd && rm -rf /tmp/pagespeed

Now, login to your cPanel WHM > EasyApache and look for “mod_pagespeed” option under the short lists along with other Apache modules. Select it,  make sure to enable deflate and version module.  Re-compile Apache webserver using this and you are good to go with PageSpeed.

– The default conf file will be under – /usr/local/apache/conf/

– Refer these sites to customize your configurations :


Root your Samsung Galaxy Tab4 SM-T-231

I recently bought this Galaxy Tab4 and opted to use without a sim. However, the notification “Insert your SIM”, was driving me crazy and I decided to remove this system notification, but needed to root my device before that. If you wish to root your Galaxy Tab4, use the following given steps :

1) Make sure all the samsung drivers are installed in your PC

2) Boot the device into download mode by holding Power+Vol down+home and connect to computer using the USB cable.

3) Install Odin 1.85 ( Download options can be found here )

4) Download the openrecovery-twrp from this URL here

5) Open Odin, select PDA and then select the just downloaded file – openrecovery-twrp-


Make sure to untick every option as given in the above screenshot.

6) Once the PDA along with the file is selected, hit the button ‘Start’

7) Once this is complete, power-off the device, and then press Power+vol up+home to boot into twrp recovery menu.

8) select the option –  reboot > system and then move across the slide option to install root.

9) As your device is rebooted open superuser installer app and follow instructions to update the App from PlayStore and then install SU binary updates and finally then reboot.

The above steps will ensure the Device is rooted.

Now, to remove that agonizing notification “No Sim inserted”, do the following steps :

  • Download the free “Notifications Off”  App from Play store
  • Once it is installed, open the App and search for “system ui” and then un-check it and save your settings.

Vanished ! 😀


cPanel upgrade to 11.50.x – issues with horde database ?

Prior to cPanel & WHM version 11.50,  Horde user data was stored in a single server-wide MySQL database. However, in 11.50, cPanel moved these data to individual SQLite database for each cPanel account.

Recently, during the upgrade, several users are seeing this failure message :

While attempting to back up Horde database, mysqldump did not exit cleanly: 2

For more information about the exact nature of the failure, review the /var/cpanel/logs/horde_mysqltosqlite_log file. cPanel & WHM versions 11.50 and later require SQLite for Horde data storage. Any Horde data that the system could not migrate is not visible to Horde users.

Review the log file as mentioned and see if the entire conversion has failed.

The command to perform the conversion in full on a server that did not get a chance to begin the conversion would be :

# /scripts/horde_mysqltosqlite

If you encounter a server that has been partially completed according to the output of the conversion process  /var/cpanel/logs/horde_mysqltosqlite_log , then it can be performed for a single user as per the logs using the following command :

# /usr/local/cpanel/3rdparty/bin/perl -MCpanel::Horde::MySQLToSQLite -e 'Cpanel::Horde::MySQLToSQLite->new->convert_user("cpanelaccountname")'

Replace ‘cpanelaccountname‘ with the concerned cpanel account name viewed from the logs !


%d bloggers like this: