Tuesday, November 24, 2009

Removing IP manually after created by Cpanel

Go to /etc/ips
and remove the line with the IP you want to remove.

Other way to add multiple IPs on a non cpanel is
Go to /etc/sysconfig/network-scripts/
Then add ifcfg-eth0:1 with different ip.

For example

Saturday, October 17, 2009

Unicode error warning red message

To fix this, we need to alter the database using this command

ALTER DATABASE `dbname_moodle` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

How to add a regular user to become Site Administrator in moodle from backend

Go to mysql and select the right database.
Then select the userid that your username is using in mdl_user
Then update mdl_role_assignments set roleid and contextid = 1 where your userid = thenumber above

Saturday, September 19, 2009

Transfer ssl certificate

1. SSH into your old server. You should be able to find these two directories:


The first directory contains the key file while the second contains the certificate signing request (CSR) and the certificate itself.

2. Now identify the relevant files you'll need to copy over to the new server.

If the SSL domain is "secure.domain.com" these files should be copied over to the exact same directories on your new servers:


3. Now use FTP,WGET or your preferred file transfer method to move these files over to the new server

4. Log into WHM as root, go to SSL/TLS -> Install an SSL Certificate and Set Up a New Domain

5. In the Domain field, enter the relevant domain (eg. secure.domain.com), click on the fetch button ABOVE (NOT below). Your SSL cert should be displayed in the box and the username, IP fields should appear automatically.

6. In the panel immediately below click on the FETCH button to fetch the .key file. This should appear as well.

PS: You might need to double check the crt. Compare the crt on both server. It might need a copy and paste the crt.

Thursday, September 3, 2009

Setup redirect on a site

Using .htaccess

RedirectMatch .* http://newsite.com/
Options -Includes -Indexes -ExecCGI

Thursday, August 27, 2009

Sekedar Catatan biar gak lupa.

Hukum Volume :
Harga turun volume kecil = Buy on weekness (BOW).
Harga turun Volume besar = SELL
Harga naik Volume kecil : Sell On Strenght (SOS)
Harga naik volume besar = BUY.

Wednesday, July 22, 2009

Upgrade mysql through Cpanel in Centos

You would first go to WHM >> Server Configuration >> Update Config and change it to Manual Updates Only (bleeding EDGE tree). Then you will want to run a /scripts/upcp --force and after that finishes a /scripts/mysqlup --force

Friday, January 30, 2009

Debugging in moodle config.php

To turn on debugging in moodle config.php, you need to add code

@ini_set('display_errors', '1');
$CFG->debug = 38911;
$CFG->debugdisplay = true;

To show only to your user account
$CFG->debugusers = '2';   (replace 2 with your moodle userid)

$CFG->debug = X

Where X can be:
0 - none
5 - minimal
15 - normal
6143 - all
38911 - developer

And to show it

$CFG->debugdisplay (1, or 0)

controls whether debug messages are included in the HTML output. 0 means it goes to Apache's error log.

Monday, January 19, 2009

Rebuild apache to include mssql or ldap

Please look at the info below


insert --with-ldap=shared,/usr on all_php5



Before that, you have to install freetds for mssql
Just do yum install freetds-devel

or install openldap-devel for ldap
yum install openldap-devel

If for some reason, cpanel is trying to give error about looking for libtds.so,
go to /usr/lib
then type
ln -s /usr/lib64/libtds.so
ln -s /usr/lib64/libtds.so.5
ln -s /usr/lib64/libtds.so.5.0.0

Another site to look at

That's all.