Change MySQL database collation

You can change database collation from the WHM/cPanel.

1. Enter your WHM/cPanel and select phpMyAdmin.

2. Select the database you wish to manage.

3. Click on the Operations tab in the top menu of your phpMyAdmin

4.  At the bottom of the page you will see the collation option. Select a collation from the drop down menu and click on the Go button.

You are all set.

Reset Joomla admin password

Joomla admin password is stored in mysql, so it can be changed easily by running a simple mysql query.

If you have a cPanel account, use the phpMyAdmin to reset the password. Select the Joomla database and run the following query.

UPDATE `jos_users` SET `password` = MD5(‘newpass‘) WHERE `jos_users`.`username` = “admin” ;

“newpass” – replace this with the new password you wish to use.
“admin” – replace this with your username.

and submit the query.Now you should be able to login to Joomla admin page with the new password.

Updating Cpanel Apache Configurations

When changes are made to the httpd.conf on a cPanel server, people don’t update the distiller file normally. So when apache is recompiled, the changes are lost. To avoid this, please be sure that you save the changes to the distiller file by running the following;

/usr/local/cpanel/bin/apache_conf_distiller –update –main

This will confirm that the changes were saved and will save the changes to the main distiller config, saving them for the future apache recompilations.

Installing ImageMagick on a cPanel Server

You can easily install Imagemagick on a cPanel by using cPanel script.

/scripts/installimagemagick will do it for you.

HOLD ON, this is not it yet!!!! We need to get it into PHP rite?

The new WHM has utility to complete the task.

Log into WHM >> Software >> Module Installers >> PHP Pecl and install imagick to get the whole thing binding into PHP.

That should be it, if by any chance you got a problem with a 64 bit OS and WHM can not find imagick then install it manually, by following the steps below

Check if ImageMagick-devel is installed, if not install it using yum.

Then you need to download the Imagick PHP extensions, located here:

cd /usr/src/
tar -zxvf imagick-x.x.x.tar.gz
cd imagick-x.x.x
make install

Now go back into WHM and try to activate imagick again. That is it 🙂 You are all done.

cPanel Fantastico Installation

SSH to your server and run the following commands from shell:

cd /usr/local/cpanel/whostmgr/docroot/cgi
wget -N
tar -xzvf fantastico_whm_admin.tgz
rm -rf fantastico_whm_admin.tgz

Now goto WHM -> Plugins -> Fantastico De Luxe WHM Admin

Upon loading, Fantastico De Luxe WHM Admin will auto-update your existing installation (if existing). All admin files (masterfiles, tarballs, settings etc) will be moved to or created at /var/netenberg.

After the installation is complete, click on “Settings” and go through the settings. While some settings are not important, some other (marked below with an *) are essential for a proper functioning of Fantastico installations.
Language: Select the language for the admin backend AND default language for users without a language selected.
Email notifications: Enter an email address in order to receive notifications when users perform installations using Fantastico.
Master files settings (*): If you are not an advanced user who modifies the master files, leave this to “Remove”. Change this only if you know what you are doing Cheesy
PHPsuexec (*): VERY ESSENTIAL!!! Changing this value will not install or de-install phpsuexec for you. It will only tell Fantastico that you have phpsuexec installed or not installed on your server. Change to “installed” if you perform installations which produce an “Internal Server Error”. Notice: Changes will not apply to existing installations! You have to re-install in order to have working installations.
Path to netPBM: Enter the full path to the netPBM binaries in order to enable Gallery installations. As long as this field has no value, your users will not be able to install Gallery.
Select Fantastico licensing and files server: If the Fantastico pages take long to load switch to the server that works best for you. Fantastico will auto-switch if connections time out.
Update preference: Select latest version (sometimes experimental) or stable version (best working).

EasyApache Internal Server Error

If Easy Apache gives Internal Server Error like this,

“Internal Server Error

Premature end of script headers: /usr/local/cpanel/whostmgr/docroot/cgi/ Please check / usr / local / cpanel / logs / error_log for the exact error.”

By following the breadcrumbs(i.e. the error message) and checking the error_log, I find that the problem is:

Acme::Spork version v0.0.8 required–this is only version v0.0.7 at /var/cpanel
/perl/easy/Cpanel/Easy/Utils/ line 14.
BEGIN failed–compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy/Utils/Bac line 14.
Compilation failed in require at (eval 28) line 3.
…propagated at /usr/lib/perl5/5.8.8/ line 85.
at (eval 26) line 3
at /var/cpanel/perl/easy/Cpanel/ line 15
BEGIN failed–compilation aborted at /var/cpanel/perl/easy/Cpanel/ line 1
Compilation failed in require at (eval 16) line 3.
…propagated at /usr/lib/perl5/5.8.8/ line 85.
BEGIN failed–compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy/
line 8.
Compilation failed in require at /usr/local/cpanel/whostmgr/docroot/cgi/easyapac line 67.”

Download and install latest Acme::Spork module in the server (now v0.0.8), it will fix the error.

Upgrade ClamAV in cPanel Server

You can upgrade the clamav installations in the server to the latest version by the following steps.

For 32 bit:
cd /usr/local/cpanel/modules-install/clamavconnector-Linux-i686

For 64 bit:
cd /usr/local/cpanel/modules-install/clamavconnector-Linux-x86_64

Then, download the source of the latest version of ClamAV. You can find the download the latest source at

Now, open the file ‘install’. This file is located in the current directory.
vim install

Find the line ‘AVV=0.95′ and change it to ‘AVV=latest version′

Then edit the file ‘progversion’ and put the latest version of ClamAV there. You can do this with a simple command.

echo “latest_version” > progversion

Finally, run the install script with the command ‘./install’.

And thats it. Your ClamAV should now get upgraded to the latest version.

Error connecting to MySQL: Access denied for user: ‘da_admin@localhost’ (Using password: YES)

When connecting to the MySQL screens in DirectAdmin, if this error appears, that would indicated that the “da_admin” user has not been setup correctly. To resolve this do the following.

1) Make sure the root mysql password works. If you know it, skip to 2). The mysql root password can be found in the /usr/local/directadmin/scripts/setup.txt if it has not been deleted. It’s under the header “mysql=”. If it cannot be found, then mysqld will have to be restarted with the –skip-grant-tables option:

service mysqld stop
mysqld_safe –skip-grant-tables &

That should start up mysql without the need for a root password. Once in, type

use mysql
UPDATE user SET password=PASSWORD(‘newpass’) WHERE user=’root’;

That will reset the root password for you.

Type “killall -9 mysqld_safe; killall -9 mysqld” to shut down mysqld.

Start it up again with

/sbin/service mysqld start

2) Once the root mysql password is set and known, then you can begin the process of resetting the da_admin mysql user. Type:

mysql -uroot -p
Then press enter. You’ll be asked for the password. Once in mysql, type:


That should set the password for da_admin in mysql.

3) Now we need to make sure it’s setup correctly for DA to use. Edit /usr/local/directadmin/conf/mysql.conf and set


4) Test it out in DirectAdmin.

Some system have a /root/.my.cnf file with a preset password. This will override the value set in DA. If you’re getting a similar error during backups or restores, try deleting or renaming your /root/.my.cnf so that it doesn’t conflict.