Show Detailed Error when Moodle show blank page

One of the customer is facing blank page when they are using Moodle application but they can’t find a way to show the error from Apache error_log.

After search around from the Internet, it is found out Moodle used their custom PHP ini_set function to define the PHP value.

In order to show the detailed error which got from Moodle, simply add the following code to the config.php file.

ini_set ('display_errors', 'on');
ini_set ('log_errors', 'on');
ini_set ('display_startup_errors', 'on');
ini_set ('error_reporting', E_ALL);

Now, browse to your page again and you should see the detailed error by now.

cPanel: Database size is Zero

Wonder why cPanel database size is not calculated and it is always showing zero (0) in the database section?

You may fix this by 2 options,
Option 1:
1. Log into WHM(Web Host Manager).
2. Go to Server Configuration and look for Tweak Settings.
3. Look for “Include databases in disk usage calculations” and enable it.
4. Save it.

Option 2:
1. Log into SSH.
2. Open the file named /var/cpanel/cpanel.config.
vi /var/cpanel/cpanel.config
3. Search “disk_usage_include_sqldbs” and change the value to 1.
4. Lastly, run the command as below,

Blocked External Update Services request from WordPress

By default, WordPress allowed us to apply the update services where this services will notify external link on the update of your blog.

Somehow, if you do not want to update these update service to be updated, you may disable it from the WordPress configuration file in wp-config.php file.

To done it, simply add the following code to your wp-config.php file as code below.

define('WP_HTTP_BLOCK_EXTERNAL', true);

How to Disable Windows 7 Preview from Internet Browsers

Whoever used Windows 7, you should know the most excited feature from Windows 7 is it’s preview mode from the task bar.

However, not everyone enjoy the feature due to hardware restriction. Hence you might want to disable the preview mode from the task bar for several Internet Browsers such as Mozilla Firefox, Google Chrome, Internet Explorer, etc.

Mozilla Firefox

To disable Preview from Mozilla Firefox, you may open the firefox and enter “about:config” from the address bar. Then just proceed with the button of “I’ll be becareful, I promise!”. In the filter bar, enter browser.taskbar.previews, and set the value to false for browser.taskbar.previews.enable.

Google Chrome

To disable the preview mode from Google Chrome, you may refer to the step as below.

From your Windows, go to the directory of “C:\Users\username\AppData\Local\Google\Chrome\Application\“, go to the properties of chrome.exe, move to Compatible tab and set the compatibility mode. You may choose to have Windows Vista mode(any mode from Windows Vista will do).

Internet Explorer 8

With Internet Explorer 8, you may go to the tools and change the setting from Internet Options.

From the tabs Setting there, click on the Settings button and you are able to see the image as beside.

Just checked the button named “Show previews for individual tabs in the taskbar” and the previews should be removed.

Remote MySQL Access for cPanel

By right, MySQL is one of the engine that used up lots of I/O and Memory resource from a server. Somehow you may use this scenario to setup so-called Clustering Web and MySQL server to reduce the I/O usage.

To setup remote MySQL server, you need 3 main steps as below.
1. Grant remote access to cPanel root user.
2. Add remote host information to /root/.my.cnf file.
3. Configure PHPMyAdmin configuration.

1. Grant remote access to cPanel root user,
To grant remote access to cPanel root user, you will need to amend the MySQL privilege as line below.

2. Add remote host information to /root/.my.cnf file,
Next, you will need to change the host of the MySQL location to the slave server.

3. Configure PHPMyAdmin information,
Open file /usr/local/cpanel/base/3rdparty/phpMyAdmin/, configure the setting as below.
$cfg[‘Servers’][$i][‘host’] = ‘’;
$cfg[‘Servers’][$i][‘port’] = ‘3306’;
$cfg[‘Servers’][$i][‘socket’] = ”;
$cfg[‘Servers’][$i][‘connect_type’] = ‘tcp’;
$cfg[‘Servers’][$i][‘extension’] = ‘mysql’;
$cfg[‘Servers’][$i][‘compress’] = FALSE;

You have done the setting.

How to access AwStats outside from cPanel

Many of the user will ask how could them access the AwStats outside cPanel since cPanel restricted them must log into the cPanel to get their information.

To get the AwStats for every of your webmaster to view and you do not need to let them access to the cPanel account, you may follow with the full step as below.

1. Assume that you are creating a subdomain name where I will use

1. Download the latest stable version of AwStats as URL below. (I’ll guide you for Unix tar.gz file)
2. Extract the tar file. (according to your downloaded version)
$ tar zxf awstats-6.95.tar.gz
3. Move the all folder from the extracted file wwwroot folder to subdomain folder.
4. Go to the cgi-bin folder, copy the file named awstats.model.conf to
5. Open and edit the file
– Edit the LogFile, change it to/usr/local/apache/domlogs/
– Edit the SiteDomain, change it to
– Edit the HostAliases, delete the REGEX[myserver\.com$] and change it ( and
– Edit the DirData, from . to /home/mickgenie/tmp/awstats/ where this MUST same like your cPanel setting.
6. You have done for all.

You may now access to your awstats as URL below.