This is my cheat sheet if I have to look back for an answer for problems. You're welcome to add or comment the answer.
Monday, September 27, 2010
Questionnaire Export CSV Issue
You're trying to export questionnaire responses to csv format and there are missing response on one or more columns. Check the question name for that missing column and rename it with something else. It's probably a general name such as ID or Full name that interfere with the moodle general field name.
Tuesday, March 23, 2010
Mysql trick show tables
mysql databasename -u [root] -p[password] -e 'show tables like "wp_153_%"' | grep -v Tables_in
| xargs mysqldump [databasename] -u [root] -p[password] > [target_file]
| xargs mysqldump [databasename] -u [root] -p[password] > [target_file]
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
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.18.0.15
NETMASK=255.255.0.0
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
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.18.0.15
NETMASK=255.255.0.0
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;
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
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:
/usr/share/ssl/private
/usr/share/ssl/certs
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:
/usr/share/ssl/private/secure.domain.com.key
/usr/share/ssl/certs/secure.domain.com.cabundle
/usr/share/ssl/certs/secure.domain.com.crt
/usr/share/ssl/certs/secure.domain.com.csr
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.
/usr/share/ssl/private
/usr/share/ssl/certs
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:
/usr/share/ssl/private/secure.domain.com.key
/usr/share/ssl/certs/secure.domain.com.cabundle
/usr/share/ssl/certs/secure.domain.com.crt
/usr/share/ssl/certs/secure.domain.com.csr
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
RedirectMatch .* http://newsite.com/
Options -Includes -Indexes -ExecCGI
Subscribe to:
Posts (Atom)