Friday, December 28, 2007

VMware Fusion I'll wait a little longer

These are key factors after a few days of testing.

  • I tried both bridged and NAT for the NIC and tried without much success to join my office domain
  • The display can be set as large as 2360 x 1770 of course that won't work, I still prefer dual monitor
  • The fan of my macbook triggers every 5~10 minutes, it was under stress definitely, perhaps I should allow less RAM to XP to ease its load. There wasn't much apart from Safari running in OS X, may be Fusion took too much load in the background?

I'll wait for a better version before I invest.

Thursday, December 27, 2007

VMware Fusion - not yet ready for me?

The installation of guest OS was smooth and interface is nicely designed as in other Mac applications. It was nearly an unattended installation (e.g. no question asked about FAT/NTFS format for the HDD and VMware Tools were installed automatically once XP installation was done) and it was faster than what I did earlier on my PC with C2D 6420 + 2 Gb RAM.

Too bad I found that no settings were available for display resolution (I could adjust that in guest OS whereas for VMware workstation I have to do that before starting XP Pro) and no dual monitor support. VMware Communities confirm this feature isn't available yet.

The 'unity' feature looks weird but could be useful. It's like blending spaghetti with noddle.


Tried Parallels as I said here. I have also just tried VMware Workstation 6 for Vista. I have built ubuntu 7.10 and XP Pro on my C2D PC running Vista. Experience is better than Parallels both at installation and running them.

There are few distinct good things about VMware

  1. VMware let you decide how many cores for your guest OS

  2. VMware supports more than 1 monitor (upto 10 if you have that many available to your host OS)

  3. networking between OS is a lot easier using NAT, network address translation

  4. the guest OS runs on a file instead of a partition of my HDD

I'll be trying an evaluation copy of fusion on my MacBook. For $79.99 I think it's a good deal. VMware for Windows costs a lot more at $189. Again I prefer not to run ubuntu from a partition 'cos I have dual monitor so I could be doing a few things at once.

I'll have to find out if VMware requires XP Pro w/SP2 for installation. I don't believe so as VMware forms a layer between OS X and the guest OS therefore not having direct access to MacBook's hardware hence shouldn't be requiring SP2 in order to run BootCamp?!

Monday, December 24, 2007

What have all the leaders gone?

This is the book I just bought.

Thursday, December 20, 2007

Starting over again with tags

I merged 2 sites together into this one and I have hundreds of tags. Yesterday I deleted them all and started over again as I don't think I need them all. In fact what do I (or visitors) use the tags for? What's wrong with search? At times I simply don't know what tags are best for my entries. I did like UTW's inline tag feature such that I add tags while I type my entries.

'A year ago' and 'Two years ago' are added to the sidebar. My first post here was dated December 2004 so I guess 'Three years ago' will show something as well.

Wednesday, December 19, 2007

How do I print screen?

It takes a while to get familiar with the MacBook keyboard when running Windows under BootCamp.

Simple thing like print screen could be a headache. Found this post which is very useful at least you know a on-screen keyboard is there to help you if your keyboard isn't connected or malfunctioned.

In MacBook print screen is simply 'alt+fn+F11' that'll capture whatever you have on your screen. If you have dual monitor like me that could be too much. You want just the selected window? You'll then need the on-screen keyboard and click 'alt+psc'. To hold a key then click the second key firstly you have to double click the first key, which will be highlighted, then click the second key.

Tuesday, December 18, 2007

Office 2007

At last I heard that our Group will be training staff to use Office 2007 and all existing PCs running Win98 will be upgraded to XP.

I tried connecting beta Office 2007 to our exchange server earlier this year and later disappointed by the fact that we are still running stone age server 5.5 (introduced 10 years ago!).    I don't know what we are having yet but I guess very soon I can use Office 2007.

From here we'll get 'main stream support' of XP until 2009 and 'extended support' until 2014.

Monday, December 17, 2007

Parallels or not?

Just tried Parallels last night. It works fine in my MacBook but starting XP was a problem because it requires re-activation of my copy of XP. I have a copy of XP Pro with SP2, which is required by BootCamp, but it's of OEM version. OEM version can't be activated twice. Is Microsoft trying to make it difficult for people using OEM version? PC does crash once in a while and reinstalling is sometimes the only way out. I have about a month ago enquired at one of the shop for a full version and the guy asked for $321 and added that " quick price is going up...". I opted for the OEM version at $135. There are also a few things that may be stopping me from using Parallels.
  • From Task Manager I see only 1 core running, performance downgrading?
  • Shared network, how am I connect to my office network (done, setup Macbook NIC to suit office network then both OS X and XP will share the connection) with fixed IP, gateways etc?
  • In XP mode I can't use dual monitor
  • (edited) I can't set clocks of OSX and XP to be the same, don't know why.
  • (edited) I can access internet via office network alright but I can't access network resources.
I guess my alternative would be slimming my current installation of XP such that it fits the maximum partitioned size of 10G in MacBook and have everything else saved in external HDD.

Friday, December 14, 2007

Thursday, December 6, 2007

Primary school for Douglas

The lucky draw result on end November was not satisfactory, we have no luck.

Today I paid registration fee for the one in Stanley, case is over we will be worrying something else from now on.

Tuesday, December 4, 2007

Ubuntu 7.10

I took my PC home, installed ubuntu again on partition and upgraded from 6.06 to 6.10 then 7.04 and eventually to 7.10. I got what I was hoping for, i.e. device driver to support widescreen of 1,440 x 900 and a nice GUI configuration available to switch between video card driver.

The upgrade took a fair while because there were some 9xx files and 1,xxx files to get for the last 2 upgrades. I intend to use that mostly at home while I use MacBook in the office running parallels.

Pagination isn't working

Currently pagination at the bottom of content isn't working.

I moved from which was also running in Habari. This site was setup on 29th November (r1157?) and I moved content across using phpmyadmin export without much problem and pagination was working. I tried importing content using the importer plugin from my Wordpress site, it failed. I ran svn update, tried again, still failed.

I made a fresh new Habari install and found that there are 20 tables instead of 23! No wonder importing MySQL database wasn't done properly.

I'm now waiting for a solution or further advice r1172 works fine in my test under XAMPP running in Windows XP. I'll have to replace that /system/classes/rewriterules.php (or temporary hack by putting the good file in /user/classes/) file at home tonight.

X'mas Tree 2007

3 hours of work for 3 of us.


Thursday, November 29, 2007

Goodbye VPSLink

Just canceled my plan with them. They are alright I have to say except that support was a bit slow or slower than I would have expected.

My OpenVZ server isn't useful now as my slice at Slicehost is up and running and I think LAMP is my comfort zone. I have not managed to get LEMP running after all.

There are more optimization and tweaking I have to learn about Apache, MySQL and PHP so I'll stay with my 256slice for the moment.

Wednesday, November 28, 2007

Apache isn't complaining now!

For the first time then I run apache2ctl configtest I have just Syntax OK and nothing else. I'm so happy.

The key is the site files in /etc/apache2/sites-enabled/, a typical one should look like this

#NameVirtualHost *
[VirtualHost *=""]
ServerAlias *
DocumentRoot /var/www/

of course with other directives as required.

I have also appended below line to /etc/hosts

my.own.ip.number and to file hostname this line

After a apache2ctl graceful I have 82M used and 173M free from free -m. Further tweak was commenting out mpm_worker_module and use prefork MPM (multi-Processing Module) which is default for Linux and recommended if PHP is run as a module.

Sub.domain now I know

Eventually have my subdomains setup correctly last night. Subdomain using namebased virtualhost is like an ordinary domain therefore the key is setting the DNS records right.

Say you want to have these sites and * running Habari at folder /var/www/habari running WordPress at folder /var/www/wp

You'll need DNS setup below (in the case of Slicehost) (name) (data) A (type) (name) (data) NS (type) (name) ns2..... (data) NS (type) (name) ns1..... (data) NS (type)

www (name) (data) A (type) (name) (data) CNAME (type) (name) (data) CNAME (type)

One other setup which may also be key is to add (create if it's not there) below lines to this file /etc/apache2/conf.d/virtual.conf.


# enable multiple virtual hosts


NameVirtualHost *

Also the first line #NameVirtualHost * in all site config files stored under /etc/apache2/sites-available should also be commented out.

Last night I also have Shorewall installed, transferred content from this site using WXR export to that WP test site. During import found that I have chmod 777 . folder /wp-content/ such that the uploads folder can be created by the import script.

May be my apache or mysql aren't properly optimized yet as I found out from stat at SliceManager that CPU was running flat out. I did a soft reboot and it's now back to normal. free -m gave me 88M used out of 256 which is weird as I remember seeing a lot more consumed last night.

Tuesday, November 27, 2007

Webmin or not?

Webmin is a server admin package to make administration easy via web interface rather than command line. There are few howto available and I followed this one for 7.10 at my VPSLink server.

First off there are few perl modules required such as

apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

then I need to download the package from source


Last run the install script dpkg -i webmin_1.370_all.deb. That will be it, simple, supposed to be.

I could then login by

Supposingly I don't have to install *AMP stack before this as Webmin will install Apache for me. I tried that but it just didn't finish.

At the end I did a apt-get -r to remove webmin and started over again. I guess it would be better if I have Apache2 installed first and let webmin to auto detect it.

Thursday, November 22, 2007

Rebuild OS

I have rebuilt OS to ubuntu 7.10 and noticed that VPSLink has a lot more choices such as

Arch 0.8,
CentOS 4 & 5,
Debian 3.1 & 4.0,
Fedora 7 & 8, Fedora Core 5 & 6,
OpenSuse 10.2,
Slackware 10.2 & 11.0,
Ubuntu 6.06, 6.10, 7.04 and 7.10

Now I'm pretty good at this the standard drill would be adduser then edit file /etc/sudoers followed by update and upgrade. Did also a reboot shutdown -r now, login again then install build-essential.

Next step was installing php5 by apt-get install php5-cli php5-cgi php5-mysql php5-xcache. Following advice from here file php.ini located in /etc/php5/cgi/ was also edited.

Installation of MySQL wasn't smooth, I used a one liner to install mysql-client mysql-server but mysql-client showed error of can't find package. It was OK to install mysql-server however at the end of it starting up of mysqld failed. Error was

* Starting MySQL database server mysqld!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.0 (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.0; however:
Package mysql-server-5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

which I have dealt with before.

Next was nginx which I have done before I followed this instead of the famous howto in howtoforge (the only one I could find). I don't think I need ssl so I omitted the switch --with-http_ssl_module.

The error was exactly as last time /usr/bin/php-fastcgi: Permission Denied. Nginx was started OK but not PHP, search goes on!

Wednesday, November 21, 2007

Which OS, which plan?

I have been extremely busy at work so didn't spend much time tweaking my servers.

I have also been switching between VPSLink and Slicehost, meaning also that I have been playing with 6.06 LTS (Xen) and 7.10 (OpenVS) at the same time.

6.06 LTS has caused pain due to a few missing extenions such as PDO/PDO_MySQL and PHP not meeting requirement of Habari. That was a real good practice to learn downloading from source and compiling it. Setting up DNS and vhosts have also been a problem, thinking about it again perhaps I probably don't need virtual hosting as I will be merging 2 of my sites as one, so why the hassle?

Last night I successfully installed nginx at my Xen server however getting fastcgi to work proved to be not that easy. I guess I'll rebuild OS and start again.

Perhaps I'll give webmin a try when I'm tired of setting things up. My VPSLink plan is coming to an end very soon so I'll have to hurry up my learning on that server.

Thursday, November 15, 2007

Compile PDO drivers from source

It was troublesome but at last I did it. I googled it and found someone has done this before on 6.06 the good howto is here. The author was able to pecl install pdo then downloaded from source and compiled in the server the pdo_mysql driver. I wasn't that lucky I have to start from PDO extension first using the same method.

For PDO extension

tar zxvf PDO-1.0.3.tgz
cd PDO-1.0.3

Note that modding the configure file is not necessary for PDO extension then proceed

make install

Do the same, more or less for PDO_MYSQL

tar zxvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2
nano configure

Now carefully look for line 4163 which should read something like this
if test "x$is_it_shared" = "x" && test "x" != "xtrue"; then start commenting that line out until you see fi which is at line 4173. Check line number by doing ^C and go to the line you want by ^_[line number]

After that proceed

make install

Finally add below lines

to the bottom of files /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini. Don't forget to start apache again by apache2ctl restart.

Watch careful for errors when it's complied (make) and installed (make install) or else you'll be like me doing this more than once.

Checking it again by phpinfo() to see your great achievement

Getting LAMP first

I have done this couple of times already so just followed the standard drill in my earlier post here. The only new finding is that I got couldn't find package php5-xcache. The could be due to LTS 6.06 Dapper Drake perhaps not critical so I'll deal with that later. (PS: by a package search found that xcache is only available by default from Feisty onwards)

So I got LAMP and free -m gives me

used = 237
free = 18
buffers = 3
cached = 178
swap not used

It appears Xen consumed a lot comparing to OpenVZ.

I have LAMP running so I did a quick phpinfo() to see if everything I want is available, e.g. mod_rewrite and PHP PDO driver for mysql.

Oops! PDO isn't by default available to 6.06 so few more steps are required to get there.

First of all some depended modules

apt-get install php5-dev
apt-get install libmysqlclient15-dev
apt-get install php-pear
pecl install pdo
pecl install pdo_mysql

OK it wasn't that easy on the outdated 6.06, I got

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 92160 bytes) in /usr/share/php/PEAR/PackageFile/v2/Validator.php in line 1825

There appears to be a workaround here in this post (and a similar one here) which I'll try later on.

I think I could either do either a PEAR or PECL install to get the PDO drivers I want.

Tuesday, November 13, 2007

First OS rebuild

Now I'm back to 6.06 LTS, naturally followed this article to secure my slice. I didn't do all of them, just these steps

passwd root to change root password then adduser newusername and used visudo to edit /etc/sudoers file adding newusername ALL=(ALL) ALL to the end of the file. I then used a new terminal window to make sure I could login using newusername before exiting as root.

The free -m output was

total = 256
used = 42
free = 213
free swap = 511

I then did sudo apt-get update and <sudo apt-get install localeconf language-pack-en which turned out to be not necessary. The sudo apt-get upgrade was also not necessary may be the image is already the latest one.

Last step was a reboot by sudo shutdown -r now

After that I need to get some essential packages by sudo apt-get install build-essential. Let's look at memory again when that was done.

used = 159
free = 96
buffers = 4
cached = 120
swap used = 0

Free memory after LAMP and trouble with DNS

LAMP was installed and ran free -m I got

total = 256
used = 239
free = 16
buffers = 5
cached = 177
total swap = 511
free swap = 511

I'm looking for a good howto in order to use nginx as frontend and Apache2 as backend.

I picked Gutsy Gibbon 7.10 and after reading this article I might just rebuild it to 6.06. I won't be doing anything fancy so may be security and stability are my best friends.

I had a little trouble yesterday when transferring my new domain name to Slicehost. I followed the good article here of course but I wrongly read the part about creating records for all 3 nameservers for NS entry. I created 3 A records for 3 nameservers. My shout for help didn't get heard in the forum so I emailed support who showed me the right way.

To check the domain name is pointing to the right DNS do this


Monday, November 12, 2007

My slice before LAMP

Below is output of 'top' with only Gutsy 7.10 installed

Picture 2.png

I can see that 36.4% of memory available has been used by the OS running idle.

I also did a tracert to my slice, average time was 272ms. It traveled through these places

Hong Kong ISPs
Los Angeles
Los Angeles
San Jose
St Louis

Most of the nodes are Level3's.

First few days with Slicehost

I have their email on 10 November, that was 39 days of waiting in the queue. The link/offer given was good for 4 days so I paid up the same evening.

I built my OS ubuntu 7.10, that took around 2 minutes and I have my IP and root pass. I was too busy over the weekend so I didn't do anything with it. May be I was lucky, got below from support yesterday.

The server your slice was one became unresponsive to our monitoring at 0448 GMT and an emergency reboot was required. It appears that the network interface card stopped responding, we're investigating this issue. Slices were restarted and are running fine. We'll notify you should further action be required. Please contact us with any questions, we apologize for this downtime.

I set up my zone and changed DNS to slicehost's from VPSLink so I guess it'll be a while before I need to build my LAMP. I still couldn't ping my slice by name this morning.

Saturday, November 10, 2007

Switching to Xen

Now I have a reply from support which is that

I apologize for any delay. Unfortunately you cannot simply change or migrate to a XEN system or other system of different package types, you merely need to order a new package, then cancel the original. For detailed information you can review our thread on this topic here:

I also have email from Slicehost this morning saying that my slice is ready, so I won't be switching in VPSLink.

Friday, November 9, 2007

Support where are you?

Reading this article I want to switch to Xen. I emailed support 3 days ago, since then an email a day, so far I hear nothing.

May be they'll need me to cancel this plan and join again because OpenVZ and Xen are two different plans. Well if that's the case please tell me.

Tuesday, November 6, 2007

Saving RAM

There is a good article in VPSLink's Wiki to follow in order to optimize Apache and MySQL to fit small VPS plans.

In particular there is an article referenced which tells me more about how Apache works.

I followed recommendations in this article because I'm having a Link-2 plan. Below is output of 'top' after my first optimization.

Picture 1.png

To compare RAM used by Apache:

  • before = 41%

  • after = 8.4%

RAM used by MySQL:

  • before = 8.5%

  • after = 5.8%

Total RAM used:

  • before = 85.7Mb

  • after = 38.9Mb

Of course as recorded above was only memory used right after a Apache restart. During actual running there'll be 5 instances (PS: nearly 59% of memory used) of Apache instead of initially 2.

Monday, November 5, 2007

First reboot

No troubles no learning. I started to have a few with VPSLink now.

Yesterday I imported database of size about 2 Mb into my Habari install and used WXR to import content of this site into my trial WP install in my Link-2 plan. This plan has 5G storage and 128Mb RAM running under OpenVZ.

During import I have to increase the upload file size to 10M in /etc/php5/apache2/php.ini.

I started to have problem of logging in via SSH and got below error when clicking around in my WP site.

Fatal error: Out of memory (allocated 786432) (tried to allocate 77824 bytes) in /var/www/blog/wp-includes/classes.php on line 477. Very soon after that I have been refused login by ssh_exchange_identification: connection closed by remote host and can't even do a ls because of fork: cannot allocate memory even if I have logged in.

Technical support said I better upgrade to Link-3 plan with 256Mb RAM because Link-2 is not meant for dynamic site with database backend. I said my sites aren't even public and I was the only visitor clicking? If I could do this at a 64Mb RAM plan with Budget Dedicated why can't I do this with VPSLink?

Support said they have turned off MySQL server in order to let me do SSH login. I don't think they should be messing around that way because I have rebooted my OS last night and have no trouble since then. Anyway I'll see if I could slim down Apache and MySQL a bit tonight.

For record below is output of 'top' after my first reboot.

Picture 3.png

Saturday, November 3, 2007

VPSLink - traceroute

They are marginally faster than Slicehost, below is route taken outside Hong Kong

New York
New York
Bellevue, Washington

at around 230ms. I don't understand why there was a round trip between California and New York.

Rebuilding OS

I started over again by rebuilding OS. The web interface is quite nice so it was easy selecting ubuntu 7.10 to start over. Now I'm back to LAMP instead of LEMP.

After rebuilding the OS logging in was a problem, something new learnt. The RS key fingerprint of the server wasn't retained hence I couldn't login. More reading from here which tells me how SSH host key protection works. I have to clear fingerprint left over at /.ssh/known_hosts in order to get in.

After that installing LAMP wasn't difficult as I have successful steps written down in this entry.

Not really I found. Installation of mysql-server wasn't OK and I got failed on starting. The error was E: Sub-process /usr/bin/dpkg returned an error code (1). From the VPSLink forum I found the solution, i.e. it is a InnoDb memory related issue which requires more memory of server to run. Workaround is to disable InnoDb by uncommenting skip-innodb in /etc/mysql/my.cnf. Reading what Innodb is from here I don't think it's needed at my sites.

Now I have phpmyadmin working and a test WP site running latest svn revision at

To do:

  • install Habari at another subdomain

  • Install firewall

  • import database WP & Habari to see if they run OK

  • optimize LAMP for this small VPS Plan

Apache I know you better

I firstly tried nginx as I have played with XAMPP and Apache2 before so something new to learn would be nice.   Below was what I did

dpkg -i nginx_0.5.32~grrr-1_i386.deb

It wasn't OK during the dpkg -i apparently there is a dependency on libpcre3. Following the advice given I did apt-get -f install

The second attempt was OK and I saw starting nginx

Next I installed php5 and nano by

apt-get install php5-cli php5-cgi php5-xcache build-essential
apt-get install nano

There is a nice tutorial for installing LEMP in howtoforge here.

I saw that nginx was running but getting php to run was a bit difficult. Fastcgi was the hurdle and trick is to get spawn-fcgi bundled in lighttpd, i.e. install lighttpd but don't start it.

Conclusion I'm not ready for nginx, that's for geeks not me. By the way nginx isn't listed under servers in Fastcgi's official website.

Thursday, November 1, 2007

VPS Hosting here I come

Decided to give VPS a try, I picked VPSLink.

I asked their support about differences between Xen and OpenVS they pointed me to this. Decided to give OpenVS a try.

Brought a new domain name at GoDaddy at 10:16pm, paid up VPSLink-2 (5G storage and 128M RAM) for 1 month at $14.95 at 10.24pm, changed DNS information and created 'A' record of my domain name following instruction in Wiki here. I logged into my server using the new domain name at 10:29pm.

That was all very quick and I don't have to remember IP address now.

Now I wonder if I should be using nginx or Apache.

Wednesday, October 31, 2007

VPS Hosting

I gave up Budget Dedicated at the end, I emailed them last Friday but I didn't get their reply until this Tuesday.   Apparently they don't work over the weekend.    I was considering a tiny plan of 64MB RAM and 1GB storage for euro 12.04/month.    Also PayPal was the only payment method that I don't like.

Today I also sent off enquiry to KnownHost.    Review on them is quite good and price wise they are also attractive but too bad they came back few hours later saying that CentOS is the only choice I have.

Next one down the line is VPSlink which I also sent off an email to.    Let's see how they come back.

Blogged with Flock

Tuesday, October 30, 2007

Leopard upgrade

I did the upgrade not a clean install. I was hoping to try the out of beta BootCamp so I tried it last night.

I tell people to read manual first for everything they do but I don't follow my own instruction. I should have read the manual first.

I tried that with my genuine OEM version of XP Pro which isn't SP2. BootCamp doesn't allow that but I went ahead regardless. It wasn't OK.

That forced me to reinstall OSX which I found to be better. After the upgrade the startup screen changed, the Apple logo has gone and for some reasons the boot up took longer (I didn't time it with stop watch).

The Apple logo returns during boot up after the clean install with the revolving wheel which I prefer. A clean install also has the new Safari.

I may try installing XP again but I think it'll be hard to buy XP Pro with SP2 now from shops!

PS: the fastest Vista notebook ever is a Mac

Friday, October 26, 2007

Day 5 - Slicehost reservation

I think I'm nearly ready to run my own show so I checked my position in the slicehost queue.    Sadly it showed 3 weeks after 3 weeks of waiting, how disappointing. Even worse after reading comments to this entry in their blog.

Today I got email reminder from Budget Dedicated that I should be making up my mind soon.   I currently is playing with a 64Mb memory 1G slice there perhaps I'll pay for a month.

Other choices are VPSlink and xenEurope.

Thursday, October 25, 2007

Securing Apache

Apache is perhaps difficult and complicated to tweak so first of all I'll learn how to secure it.

In ubuntu I'll have to tweak the file /etc/apache2/sites-enabled/000-default/. To disable display or disallow browsing of folders if I don't have a index.html file there I need Options -indexes. However Habari requires that FollowSymLinks is allowed while WP doesn't need this, don't know why.

If I don't allow access to files other than those saved in the site folders then I need below between [Directory /] and [/Directory]

Order Deny,Allow
Deny from all
Options None
AllowOverride None

I have used XAMPP for years on PC there are things that I got to learn now when apache is running in a server.

Once new settings are entered I could check syntax by apache2ctl configtest before restarting apache by apache2ctl graceful

Day 4

Now I got

Starting "Shorewall firewall": done.

Bingo, it's working although I have yet to understand exactly what each setting I entered was about. The last problem was probably due to a typo.


I did a tracert in Windows to slicehost here is what I found about the route it has taken

Internal routers of office network
ISP in Hong Kong
Hong Kong IX, I think but not sure
Net Jersey, Morristown
Florida, Lake Mary
Maryland, Silver Spring
Massachusetts, Boston
Illinois, Chicago
Missouri, St Louis

Pinging the site I got 287-310 ms. Pinging BudgetDedicated I got 379-398 ms.

Surprisingly although BudgetDedicated is in Europe the trip goes first to the same location after leaving Hong Kong at then it traveled to other places like

Los Angeles
San Jose
New York

All the nodes are managed by Level3 by the way.

Do I want round the world trip every time I log into my server?

Wednesday, October 24, 2007

Day 3

Got error when starting by /etc/init.d/shorewall start

The error is not done (check /var/log/shorewall-init.log) so I went in to have a look. The part that was causing trouble

validating policy file ... ERROR: Undefined zone LAST

Hmm.....I'll look that up tomorrow.


My friend Tinyau recommends Shorewall or shoreline firewall, this would be a good start for me.

This is a tutorial at Debianhelp on the installation and setting of it. A more relevant tutorial is here and there for those who are running a Xen VPS.

I have yet to check which OS version I'm running by uname -a

Day 2

Pretty comfortable at command line now but still a lot to learn. I could type pretty fast that is helping.

Yesterday I wrongly checked out the 'trunk' folder in the folder I want set up for WP. This checkout command here isn't quite correct. So I learnt how to remove the entire wrong folder with content in it. I used rm -rf to get rid of the entire folder with subfolders and content.

Last night I have phpmyadmin working as well then I created a database for my trial Habari install. The checkout command from Habari wiki is a lot better the 'dot' at the end makes the difference.

I haven't done one fresh install for months so it was nice to see improvement at it. The Ajax thing stopped me and I had to amend the apache2 conf file to make it work.

BTW, the chmod g+w suggested in wiki didn't work I have to make it '777' to complete the install.

Monday, October 22, 2007

Day 1

I got my 7 days trial from Budget Dedicated, here is what I did today

Login to root using ssh then change password by passwd root.

Update the ubuntu pre-installed apt-get update.

Install php5

apt-get install php5-cgi php5-mysql php5-xcache


apt-get install php5 libapache2-mod-php5

Tried installing nginx but failed

Install mysql server

apt-get install mysql-server mysql-client php5-mysql

Install Apache 2 apt-get install apache2, enabled mod_rewrite by a2enmod rewrite then force-reload apache by /etc/init.d/apache2 force-reload

Install subversion by apt-get install subversion

Install phpmyadmin apt-get install phpmyadmin

Install nano apt-get install nano

Do this

df -h to see disk usage got

size used avail used%
1010M 587M 373M 62%

Add this line Include /etc/phpmyadmin/apache.conf to file /etc/apache2/apache2.conf using nano then restart apache /etc/init.d/apache2 restart

Oops! Couldn't run phpmyadmin in broswer? OK used alternatives by mysql command line. Entered below to create a database for my trial WP install.

CREATE DATABASE databasename;
GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" IDENTIFIED BY "password";

Currently I don't have a domain name ready for this so I used just ip for "hostname".

Created mkdir wp under /var/www/ checked out svn copy of WordPress by entering svn co . To get files into the right place it is important that I have cd to that new folder before checking out the files.

After that I changed root folder to /var/www/wp/ such that I could run install at http://my.trial.ip.address/wp-admin/install. I have my WP running at last.

Next I'll try securing my server.

PS: I'm waiting for my slice from SliceHost which is a 256slice plan with 256M RAM, 10G storage and 100G traffic for $20. For nearly the same (except 200G traffic) I'll have to spend Euro 40.01 per month.

Sunday, October 21, 2007

Old fashion school

One school we went last week has stood out from the rest we have seen so far. Their way of organizing interview was traditional, old fashion and unbelievable in 21st century.

We waited in the hall which was OK then a group of 3 were taken to a room where the kids could spend 10 minutes playing with some toys. Then kid was taken to the headmaster's room just next door with parents outside.

My boy didn't perform, he nearly fell a sleep on the sofa. My boy was asked to sing a song and to tell what words he could write! Lucky that he refused to perform!

While waiting I noticed in that waiting room there were some computing equipment stored. Those things were like museum collections. A Compaq notebook of nearly 4 inches thick! Perhaps they use those for a class about history of computing.

Among all others that we are bidding for this one demands for lowest tuition fee, no wonder!

Friday, October 19, 2007


Engine x or nginx is written by Igor Sysoev.    So instead of LAMP you could replace the 'A' with this 'E'.

nginx is light weight so you could run this in a cheap VPS with as little as 48Mb of RAM such as x|encon server.

This is a good Howto for installing a LEMP.

Thursday, October 18, 2007


In addition to C.R.T. that I mentioned earlier one other term I use almost everyday is D.A.M.N.

D - Stands for Design. Depending on what you do this could be a brief from your client, a description of your goal which you have developed into fine details, a menu with recipes for the big dinner that you have to cook for a big party tonight. What you have to know is understanding the goal and develop it into fine details that you will follow to achieve your goal. This 'D' comes first because you normally start from here. If you are leading a team this is where you start such that your team-mates know what to do, where to help and how to act.

A - is Access. Normally you'll have to gain access to the venue where you'll perform your duties or deliver your performance. This is easily understood if you are building something. If you a pianist you'll have to know how to get to the concert hall and if you'll be given permission to rehearse there, for example. Gaining access may involve contractual issues in many cases.

M - stands for material. This is what you need to put your goods together, e.g. something that you have to acquire apart from your own skills. If you are a chef you have to know where to buy good food for the dinner that you are delivering. If 'D' is done properly you'll know what to buy.

N - notification is very often ignored. In most cases we are not achieving goals alone. We have partners, colleagues, external helpers, vendors etc to collaborate with to get something done. These people/organizations around us have to be suitably coordinated and notified to get things going smoothly.

I do engineering projects so I call up D.A.M.N. every time I want to think about what are missing from my plans to get something done. Even for very experienced manager minor things could skip our minds or fell off the lorry, this little D.A.M.N. thing could come to rescue.

Wednesday, October 17, 2007

Netscape is back

Just downloaded latest version 9 for Mac, it's GUI is very Firefox alike so it's very easy to use.    It runs at fast as FF and probably faster than Safari.

The great thing is that FF's extensions are all good for Nevigator.    This post is sent from ScribeFire extension.

I'll certainly try this on Windows and Linux platform later.

Tuesday, October 16, 2007

Desktop for ??nix

My first experience was GNOME because this comes as default in ubuntu.

Just learnt that there are in fact a lot more for me to try such as Fluxbox, Xfce and KDE.

My PC failed

My DIY PC running Vista failed last week. This PC is only few months old using ASUS P5B motherboard running genuine Vista Ultimate. I picked an optional update for the Attansic onboard Gigabit ethernet driver upon restarting it failed to work. I tried everything I know such as roll back driver, safe mode, restore to last known good configuration etc....

I had to reinstall Vista and ended up using an old Realtek ethernet card to get back to work.

As usual to protect my installation I blindly went through downloading and installing all critical updates for Vista and my Office 2003.

One of the upgrade I did which I regretted now is SP3 of Office 2003.   This upgrade contains a new feature called Information Rights Management or IRM.   The idea is good in that forwarded emails are restricted unless recipient is authorized to view or forward it.    You could even set expiry date of forwarded email.

The trouble is unless our exchange server is running 2003 version and senders are also using this feature this is completely useless.    I'm now unable to read forwarded emails unless I roll back to SP2, dumb isn't it.

There is a fix here, i.e. get an add-on for your IE to read IRMed document, dumb.

Monday, October 15, 2007

2 more to go

Last Saturday we went to 2 interviews in one morning. We had a little breathing space in between them so we went to the beach just down the road from the school. We saw a few kids fully prepared to spend time at the beach right after the interview. I envy those who could spend their childhood in a spacious school. You'll get a lot more fun with classmates since kids are not confined to just 4 concrete walls. Today a spacious school is certainly a luxury here.

Tomorrow there'll be another interview then one more to go it'll be all done. A few of them will have second round, which is mainly for the parents, if we are lucky enough.

Thursday, October 11, 2007

ezCount Plugin

One of the component of this plugin doesn't work at this 2.4 svn revision. The error is no such database table wp_categories. It's very simple like this

$s = "SELECT COUNT(*) FROM $wpdb->categories";
return $wpdb->get_var($s);

This works for many other things such as comments and pingback etc, don't know why I get database prefix 'wp_' added to 'categories' table. Also I don't see anything new from Codex here for this.

As of now that function of this plugin has been taken away, search goes on!

Wednesday, October 10, 2007

One down five to go

Just received confirmation from one of the schools that my boy has been accepted. I'll have to pay to reserve the place before end of the month.

There are few more interviews for us to go during the next week or so. This is quite tiring but I don't have a choice just hoping that these lessons are good for my boy.

Tuesday, October 9, 2007

Tag Cloud

Now that I'm not using the great UTW I still want a tag cloud.

This is done by [?php wp_tag_cloud(); ?] for this version of WP. The reference in codex is here. I have yet to find out how to set up things like font size and colors etc. Apparently setting your desired font size is OK but not colors yet.

What about showing tags at end of each post? Just add this line

echo (get_the_tag_list('Tagged as: ',', ','.'));

or simply

the_tags('Tags:', ', ', '[br /]');

between php tags. The reference is here.

Saturday, October 6, 2007

Upload file at command line

This can be done using SCP of SSH, example is like

scp -2 /path/of_your/filename.txt

See how to use other switches here.

You'll be prompted to enter password of course as switch '-2' is for secured protocol.

Thursday, October 4, 2007

GNOME’s new desktop

Saw the new 2.2 desktop or GDM here, why am I not having this update yet?

I think it must be good looking but I'll first have to fix my display card in order to enjoy it in my 19" widescreen.

Wednesday, October 3, 2007

Hold my slice

I can't learn without taking risks. Today I clicked the 'hold my slice' button of Slicehost. I probably will have to wait for 4 weeks in the mean time I'll have sufficient time to read their tutorials and learn how to tweak my own server. If it doesn't work I'll have no support to shout at it'll be all down to me.

Installing Ubuntu is sort of preparatory learning, a first taste of linux, before I enter the world of command line without GUI.

I'm quite comfortable now using ubuntu desktop at home. I plan to get a cheap video card to suit my 19" widescreen at home. When I have my slice it'll be convenient that I see tutorial on my MacBook and SSH my server to do setup.

Tuesday, October 2, 2007

Primary School allocation

This is commonly known here as lottery.

You have to be very lucky to get a place if you are not 'connected' to the school you want to send your kids. This system is perhaps unique in the World.

I dropped the form in the system this morning and I'll be looking forward to the lottery result from this school in late November.

Monday, October 1, 2007

Add users to SMB

Adding users to SMB is like

smbpasswd -a newusername

then you'll see prompt of

New SMB password:
Retype new SMB password:

Oops, you'll probably get Failed to modify password entry for user newusername It's not that simple. What I have to do is adding users to ubuntu first by going to system>administration>users and groups. Adding user there then you'll be able to set user and password to SMB server at command line. When you see Added user newusername then you are done.

Now SMB has to sync password with that set in Linux then you'll have to uncomment that line unix password sync = yes and encrypt passwords = true by removing the semi-colon at the start of those lines.

It's a safe bet that you restart SMB server by

/etc/init.d/samba restart

It's all OK sharing folders to my MacBook I still couldn't login shared folder from my Toshiba R100, investigation goes on. is now OK.

Secure Shell server

I need SSH to enable access from a remote PC. I need to install SSH from command line.

apt-get install ssh

The suggested package is openssh-server ssh

Then I tried logging into root from my MacBook by typing this at terminal


It was all OK and I found my way into the habari and wordpress folders of the LAMP server without any problems.

Sharing folders across network

Next I need to learn is to share folders in ubuntu such that I could copy/edit files from other PC over intranet. I tested this from my MacBook at home.

When I clicked sharing folders I have a choice of UNIX or Windows file system I picked Windows naturally. Samba, SMB, was installed automatically. I couldn't access shared folder from MacBook because I was asked to enter password which I wasn't asked to set when I shared the folder!?

Since SMB (which stands for Server Messsage Block) is a server for Linux therefore it has its own user and password system. The easiest way would be to edit smb.conf file under /etc/samba/. At around line 91 change 'security = user' to 'security = share'. Don't forget to remove ; (semi-colon) at the start of the line.

Of course it's better to have access control when sharing folders more reading to do here.

Last tender and first interview

Last week I submitted last tender to this school for my boy. I submitted total of 6.

Last Saturday was also the first interview that my boy went to. It was a nice warm up and good experience for parents as well. We arrived there an hour too early but we were greeted into school where we found lots of kids were there playing in the playground.

We have a guided tour in the school, attended a talk by the headmaster, and eventually we were served lunch there. The school is one of the very few in town that is equipped with its own kitchen. My boy didn't even want to leave as he was having fun.

Sunday, September 30, 2007

Troublesome mod_rewrite

To enable the rewrite_moddule in apache is easy just do this

a2enmod rewrite

to disable it is

a2dismod rewrite

in command line after that you have to restart apache by /etc/init.d/apache2 restart. But... wait a second here ... I did all these but my Habari install was still not OK.   I have the blog and first entry correctly displayed but none of the links in the blog was working.   It must be a rewrite_rule issue, i.e. rewrite module wasn't working.    phpinfo() doesn't tell me the correct fact as well.   It was a particular apache issue with ubuntu.

I googled this (a good post here and there) and eventually found that file 000-default in /etc/apache2/sites-enabled has to be edited to set AllowOverride All    The proper way I think is to add below lines between Directory tags.

[Directory /var/www/habari/ ]
AllowOverride All

where 'habari' is the subfolder where you want the mod_rewrite magic to work. I guess there are still a lot of Apache I need to know.

Another domain name is going

I have emailed my first class classmates and received no response as to whether I should be keeping this domain name

I did get an email back asking me cost of keeping the name as he is considering using the name to polish his web authoring skill.

This name will be going in few weeks time. I really don't have time in the near future to upkeep so many sites. I have reduced mine to basically this site and another one solely about programming.

Thursday, September 27, 2007

3rd attempt works

In the last few days I had to do 3rd installation of ubuntu.    It was too greedy of me attempting to change screen resolution again.   It was simply not possible because if the VIA/S3 display couldn't display 1440x900 in Windows it won't do it in ubuntu.

Anyway it was good to have another practice of installing LAMP stack.   The only new experience was the installation of phpmyadmin who took me a while.

I checked that mod_rewrite and PDO driver for mysql were there before I attempted installation of Habari.    It didn't work to my surprise.    Later found that it was a broken revision, I updated mine to r940 then it was OK.    I also installed the latest svn r6173 of WordPress.   This is pretty new for WordPress.

Monday, September 24, 2007

Install subversion

In order to check out source code I need to install subversion, this is done by

apt-get install subversion

Follow instruction in here to check out the latest revision.

Running MySQL server

I thought I have my MySQL server installed by Synaptic Package Manager but in fact I haven't.   I was trying to log into the sever via phpmyadmin but couldn't.  Tried again via command line using

/etc/init.d/mysql start

but failed.   Decided to install it again by command line

apt-get install mysql-server mysql-client php5-mysql

Bingo, I got it finally I could login by username = 'root' and password = 'nothing'.

Wubi - Easiest Way

I have a Toshiba R100 notebook which doesn't have CDROM drive.   It'll be troublesome to try Ubuntu in it using methods in Pendrivelinux via USB thumb drive so I might try Wubi which is called Easiest Way to Linux.

Wubi enables you to install and try Ubuntu like a typical Application in Windows, i.e. you can see it in Add/Remove program in Windows Control Panel.   If I'm happy it then I could transfer the installation using LVPM thereby without the use of a CDROM drive.

Saturday, September 22, 2007

The domain name is gone

I planned the house move a while ago and as of today the domain name I once used for this site has gone so I'm here for good I hope.

Friday, September 21, 2007

Problem with switching display

I took the PC home and connected it up to my new ViewSonic 19" widescreen which requires best resolution at 1440x900.   Too bad I don't have that choice so it was looking bad.

I then switched back to another even older CRT EIZO F35 at home.   I could get 1024x768 so that is barely OK for my eyes.

I just don't understand why every time I switched display the set of resolution choices will change.    The may be due to the autodetect feature of xserver which doesn't offer choices if the display doesn't support it.

Updates are now done, am now wondering if I should upgrade to 7.04 Feisty Fawn.   Next step would be enabling mod_rewrite at the apache and making sure if I have the PHP PDO driver (according to this article I should have it already) for mysql before I attempt installing WordPress and Habari.

Thursday, September 20, 2007

I got Ubuntu Running at last

Tried the FixVideoResolutionHowto, run the Autodetect script again by below lines

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.custom
sudo sh -c 'md5sum /etc/X11/xorg.conf
sudo dpkg-reconfigure xserver-xorg

didn't work even made things worse GNOME can't even show.   I have a black screen.   Tried also restarting xserver by pressing CTRL-ALT-Backspace, didn't work either.

Found that my display card is VIA/S3G with 64M and it's not too old.

At the end I loaded the LiveCD again and found that it could detect the correct display resolution for the LCD HP L1706 I used.   May be the SONY Multiscan E200 is really too old.

I have now reinstalled Ubuntu on the same partition, for the 2nd time, and got Apache2, mysql-server and phpmyadmin etc installed using Synaptic Package Manager.   The server is running fine.   I took awhile to locate the document root as it isn't under the apache2 folder.    It was a bit difficult to locate it under /var/www/

Now I have trouble downloading 184 updates, I see what I can do next.

Wednesday, September 19, 2007

Installing Software

Installing software in Linux or Ubuntu is not as straight forward as in Windows first of all I have to read this.

There are comments in the forum that running development environment using XAMPP is a bad idea and since it's a Linux box I should be installing LAMP from the Ubuntu distro.

Linux here I come

I brought books that stay on shelf that never get read, Linux is one of them.   My RedHat 7.0 book was published in 2000.

7 years is a very long time, today I have installed ubuntu on a slow PC.    The installation was smooth and the boot manager like start page is a good design.   It doesn't fear newbie from Windows away and my old XP SP2 is still intact I think.

One problem was that I immediately regretted to have installed desktop 6.06.1 LTS instead of the server version.   What I really wanted is LAMP to test run Habari.

Another issue is the screen resolution.   I'm using an very old SONY multiscan E200.   No matter what I do the resolution stays at 1600x1200 I can't get it switched to 1024x768.   I'll have to try this Fix Video Resolution Howto later.    May be that CRT monitor is too old to be detected correctly during installation.

Monday, September 17, 2007

We are the Champions

Champions we were at that lucky number table last night.

Technology was the sector that hosted that 58th National Day Gala dinner last night and we were thrilled, as usual, not at the food but the lucky draw.   There were only 12 grand prizes and out of nearly 50 tables (didn't count at least this many I think) we grabbed 3 prizes, that was 25% of all.

I went to this dinner for 4 straight years and this was the best. The sound level was still intolerable but the joy and laugh have surpassed it.

I can't post any photos for obvious reason, i.e. I didn't take any prize home.

Sunday, September 16, 2007

Plugin activation issue, improvement on publish.php

I have posted issue 408 about plugin activation/deactivation problem.    One other user has indicated experience of similar behavior on some plugins.

I did a quick mod to admin/publish.php such that I could easily get back to the entry I just edited, here it is

if ( isset( $result ) ) {
switch( $result ) {
case 'success':
echo '[p class="update"]' . _t('Your post has been saved.') . '[br /]';
if ( isset( $slug ) ) {
$post= Post::get( array( 'slug' => $slug, 'status' => Post::status( 'any' ) ) );
echo [a href="'.site::get_url('habari').'/'.$post->slug.'">Return to post[/a][/p]';

Skippy confirmed that this isn't a bad idea but at present user/classes only overrides files in system/classes but not those in admin/.

It would be ideal for user to have, after the entry is saved successfully, to have links going back to the entry or the page when it was first directed from.   Perhaps something like a hidden field.

[input type='hidden' name='redirect_to' value='$_SERVER['REQUEST_URI']' /]

Haven't tried this out but this may work.

Friday, September 14, 2007

The customers that haven't showed up are more important

I took a day off just to submit few more tenders to this, this and that school.   It was a pleasant day with blue sky and mild breeze.     The route was specially designed by my dear so after that we went to the peak for a relaxed lunch.

We went to the Chinese dim sum restaurant at the top floor, not too surprised it was empty.    We were taken to a little corner at the highest level I have no doubt that must be the best place with the best view.    The corner there has 4 x 4 persons table and 2 x 2 persons table.    There were already 2 persons occupied one of the table.    We were told to occupy the other 2 persons table.

What do they have in mind?    It's a norm here, from my experience, that captains in restaurant would train staff to reserve tables to customers yet to come, e.g. if we have taken a 4 persons table what if there are few 4 people groups coming after us?    This doesn't appear to be a wrong concept.    Have they ever thought of what we were expecting in such circumstance?     Do they expect us to sit elbow to elbow with 2 strangers at the best corner at the peak of Hong Kong that we have to pay good dollars on a sunny relaxed afternoon accepting the idiot's decision to have our privacy sacrificed?

What they should have done is the opposite, i.e. assuming every customer that arrives at the doorstep to be their last VIP that working day.   At the end there were only 1 more couple arrived at that little corner who happened to be someone I know.    It was OK to eat in that empty place if not because of the wrong sitting at the beginning.

Isn't this normal?    We also believe that the parking space that we didn't get is better, the school that didn't enroll my boy could have been better, the rice cooked next door smells nicer (saying here), the customers yet to come are more important...!

There was a parent sharing session at my boy's kindergarten yesterday evening.   A lot of parents warned us not to push kids to a school which is reputable instead put them in a school which is suitable.    Reputable school is what you see from the outside.   A suitable school is something that fits the inside of your kids.

4,000 download

The 3,000 download was dated June 29, 2007 today there are 4,015 downloads.

As usual a summary

Barebones series templates = 1,288 (125%)

ezLogin plugin = 1,541 (132%)

Sunrise/Sunset templates = 552 (127%)

ezCount plugin = 326 (129%)

Habari plugin/template = 308 (226%)

I have added this time a % increase since last report.    I can see that downloads for Habari are increasing sharply.

Theme DarkHalf is done, sort of

I have now used the DarkHalf 0.35 theme at Not So Wise so this site is returning back to 'Round Box 0.45'.

The Feedburner subscription has the wrong address I still have to fix that. I have done a couple of themes now so I said at the user-group that I hope someone would do theme switcher plugin such that I could easily preserve the themes I did.

I lost count actually I think I have done these

  1. Barebones

  2. Classical

  3. Roundbox

  4. DarkHalf

Wednesday, September 12, 2007

Training vs Education

I'll be sending my boy to Primary school next year so there is a lot of preparation work this year.    To name a few I have to do market research, run around to all these schools attending seminars, fill up forms and possibly interviews.

I don't really know if effort is worthy for my boy.

I have attended seminars here and there so far.    These seminars are just marketing show by the headmaster, nothing more than that.    The good thing about it was that I now have a feel from their speech, gesture, answers to questions as to how they run their school and most importantly their 'value system'.   That is better than reading their prospectus and comments from other parents.

I don't think my boy could ever get into any of these so called top schools which probably doesn't matter much to me.

To me primary schools provide training rather than education due to very restrictive syllabus and the general perception that examination grades are only yardstick of achievement.

Albert Einstein once said

The only thing that interferes with my learning is my education

I can't agree more and would add " can only learn outside the schools...".

Tuesday, September 11, 2007

Function to show recently posts

The little template function that I wrote here turns out to be wrong.    I was trying to improve it by showing entries say a year ago.    This blog is too young so I tested that in my main blog.    I got wrong results displayed.

I found that the parameter I used in the Posts class was wrong hence I wasn't getting all the posts in the database.    It's now working here as I could check if this function is giving correct results.

There are actually 2 functions one for recent 2 weeks and another for 'a year ago'.   May be I'll merge them together as a single one to make theme files easier to manage.

Monday, September 10, 2007

Not So Wise

It's amazing that how ideas come to my mind.    I read books and in most cases I read them to kill time.

I was actually deliberating about dropping my domain name in my bed one morning then I decided I need a new blog title once I have moved my content.    This name "Not So Wise" came to my mind.    We are at all time in search of wisdom and until the end of time I don't think we'll find all the answers.    I read this somewhere that to seek one has to admit deficiency.    I want to say here "I'm really Not So Wise...".

I later found the origin of "Not So Wise" after a little search in my bookshelf.    I found this book "Why I am So Wise" by Friedrich Nietzsche.    I have to say this little book is the hardest English writing that I have ever read.    It's translated of course because the original was in German.

I think it would have been easier if I knew German.    Nietzsche was originally a philologist therefore it could be fun reading his original German words.    I'm far too old to learn a new language.    Even my sister has given up learning after she married to a German born American.

Friday, September 7, 2007

Now I can post from a desktop client

One of the important feature of any blogware is to allow users to post from a desktop client.   Now Habari can do that by a plugin.

This post is sent from Windows Live Writer.

Wednesday, September 5, 2007

Moving site, again?

Yes, I'll be giving up this domain name very soon.

Content of this site has been moved to Not So Wise so bookmark this one from now on. I suggest you subscribe by email such that new post, when there is one, will be delivered to your inbox.

Why am I moving again? Well partly because of the new blogware Habari that I'm using. Also this domain name is expiring in few weeks so I could save a few dollars, don't believe this right?

I think I'm also in search of an identify, this could be a long story. I'm stuck with this is the domain name that I firstly signed up with Site5 some 2 years ago so unless I'm quitting them I can't change this name. I owned a name for a while and I have used this as the blog title for nearly 2 years. Then finally I got this which I thought this is my real identity but is it?

I'm obviously still searching, for the moment my new site is named "Not So Wise". More writing about this name at the new location.

See you there!

Move content between domain names

Following Tinyau's advice I have now moved content from my main site to a new subdomain Not So Wise.

Here are steps that I have taken

  1. check out latest r821 to desktop

  2. move existing installation folders at old site to ...\old\

  3. upload r821 files and folders to old site, kept just config.php and .htaccess
  4. empty rewrite_rules tables

  5. point browser to old site, let the scripts do the job making sure it's running OK at r821
  6. create new subdomain at Site5 backstage

  7. upload r821 folders and files to new site installation folder

  8. create a new database for the new installation at new site

  9. grant user permission to new database

  10. run habari installation at new site

  11. export database from old site, must check 'DROP TABLES' and 'IF NOT EXISTS' options during export, in my case it was a 1.8Mb zipped file

  12. import database to new r821 installation

  13. new site is now running here

I have also burnt a new FeedBurner feed for it and a new Analytics account.

There are few hiccups when I activated plugins. I kept on getting "...Whooops!..." when I activate or deactivate plugins and I got redirected to .../admin/plugin_toggle.

Tuesday, September 4, 2007

Bear with me

This site will be in a mess for a little while.

I have deactivated all plugins, activated this default theme K2. Further steps will be

  • upgrade this site to the last svn revision, if this is still healthy then

  • export the database

  • move content to another domain name

If everything is smooth I may consider giving up this domain name which is expiring soon.

Saturday, September 1, 2007

Improved DarkHalf layout

The dark part has 3 columns. I have now made 2 of them fluid, the middle and the right hand columns.

To do that I need an additional box wrapping these 3 columns. This box is placed inside the existing 'darkhalf' id, it's like

.inside {
margin:0 auto;

In the footer.php the new class is added

Now below is the modified CSS for the columns

#right {
width: 32%;
margin:0 1% 0 1%;
#left {
width: 23%;
margin:0 0% 0 0%;

Note that all of them are 'floated' left whereas in the last design I have the right column floated right. The trick is the 'min-width' and 'max-width' of the class 'inside'. This allows the middle and right columns to expand to the right while you drag the browser edge to the right. The left column which I have put static information is left more or less unchanged visually due to its relatively smaller % (23 vs 32+32) even if broswer is dragged.

This is a much better design originally found in the famous WP theme Hemingway.

Friday, August 31, 2007

Darkhalf 0.2

Added an 'About' section on the left hand column of the 'dark' footer.

Also in the middle section there is now 'Recently' column listing out recent posts. A custom theme function is used to generate this list. I could input parameters 'no of posts' and 'no of weeks' in the function. Currently I'm showing 10 Nos of entries in 2 weeks so it's simple 3 lines.

Thursday, August 30, 2007

This is DarkHalf 0.1

This has a bottom section in black containing all you need for navigation so it's called Half-in-Dark.

Content is not centered in the middle instead it's flushed left. Sufficient space on the right if you wanna put some photos or ads.

For a change this is not of fluid design. The color scheme is not final just something very convenient for the time being. By the way there is no footer in this design, all those stuffs are at the left bottom corner.

For a change again I'll be looking for a suitable header image for this theme. This looks nice in Safari, Firefox for Mac or Opera but terrible in IE especially if you squeeze the browser sideway.

I'm testing Tinyau's Tag Cloud Plugin.

PS: the Tag Cloud plugin is now working, Tinyau found it. Apparently the
function action_add_template_vars( $theme, $handler_vars )

isn't valid prior to r777 if it's written this way

if ( !empty( $this->tag_cloud ) ) {
$theme->tag_cloud= $this->tag_cloud;

the last line has to be replaced by
$theme->assign( 'tag_cloud', $this->tag_cloud );

Tuesday, August 28, 2007

Roundbox is done

I have Roundbox 0.45 activated here [site removed] so theme here is back to default K2.

What's next I don't know but I have been looking at Interface to see if there could be visual trick that I could use to enrich the menu display for my themes.

This Theme changes a bit

I have added color to the bottom part of this theme. I must have said this thousand times that I'm no good at color. You just have to tell me if this is good or not. In fact I like it dull and boring and believe that simple things last longer.

You like this or not I'm afraid I'll be keeping this theme for a while.

TP-Link Router

I didn't realize my wireless router is more than 1 year old now. I bought it July last year.

Since I bought my HomePlug I was using the wireless router as a hardwired router. Friend of mine said why don't we swap, I said OK.

I now have a TP-Link R410 a very old model. I didn't have the original manual but managed to find a similar one to know how to reset it to factory default. It works at last after a few trials.

Monday, August 27, 2007

This is Roundbox 0.45

I have now named the Class as 'Roundbox' for this theme in theme.php

define( 'THEME_CLASS', 'Roundbox' );

In all theme files I then call the custom function specific for this theme using e.g. Roundbox::draw('top','small'). To save typing and typo errors I have the codes generating nested [div] now coming from a function as I have this small and large round corners all over the place. The function looks like


I just have to specify $where (top or bottom) and $size (large or small) at the place where I need them.

The same way is used for displaying postmeta as well. I added a function post_meta for use in the theme files. As postmeta display is repeated a few times in home, entry.single, page.single and search therefore many lines can be replaced by just one line. The lesson learnt is that $post and $user must be passed to the function, thanks Tinyau for the advice.

Sunday, August 26, 2007

Tinyau a Habari Committer

Great to read from here that Tinyau is now a committer of Habari.

I think many of us in the Chinese blogging community will share the joy of having someone in this part of the World speaking our language participating in such a meaningful project. Why is Habari an important project to the blogging world you ask? It's because of WordPress. If you know that core developers of Habari are well known in the WP community then you know why.

As Habari is still an infant so I could pick up a lot along the way. Building theme for Habari for my own use isn't difficult. Testing plugin for Tinyau would also be joyful as our timezone is the same such that chatting with him on GTalk is only few clicks away.

Buidling plugin for Habari is still a far away target as I have yet to get familiar with OOP of PHP and get used to 'hook' and 'sink' of the core. I still don't understand why programming geeks like fishing that much. I have never in my life spent hours holding a nylon wire waiting for a fish.

My current work is simplifying this theme using the MyTheme Class in Theme.php.

Saturday, August 25, 2007

Roundbox 0.4 has colors

Now added colors to this dull and boring theme.

The colors are at the bottombars with bright yellow titles. They look pretty good to my eyes in Safari.

I'll be keep this for a while here before using this at my main site

I also found a few pages that have lost during the import. Apparently if the slug of your page is the same as one of your post then you may hit problem. The importer will add a number suffix to it e.g. 'blogging' for an imported entry and 'blogging-1' as slug for a imported page due to both of them having same original WP slug as 'blogging'.

Friday, August 24, 2007

Roundbox 0.4 has colors

This is roundbox version 0.4

There are only 2 columns and the width of the bottombars are the same as the main content. The content within the first bottombar box isn't expandable just to make it different from the bottom one. That first bottombar box appears only at home.php

I'll be changing the color of the bottombar boxes but I'll do it tomorrow or later.

Tuesday, August 21, 2007

I switched

My main blog has switched to Habari.    Is it risky may be but I'm sure I can learn along the risky path.

I'll be keeping this site as I don't think I'll be able to write plugins for Habari so I may be still able to spare time improving a few plugins that I have done for myself using this site.    Designing templates/themes are relatively easily.    I'm not saying that I could design something really beautiful but making one usable isn't that difficult.    I have done a few already and one that I like is being used here.

Creditability, Reliability and Traceabilty

I'm coaching a new team. I keep on repeating these terms so I made them easy to remember. This is C.R.T.

Creditability is

bringing or deserving credit, honor, reputation, or esteem.

Reliability is

that may be relied on; dependable in achievement, accuracy, honesty, etc.

What we are doing is managing expectations from above and these 2 are most important things that we have to deliver at work. Nobody would expect teammates or subordinates to be unreliable and not creditable.

So why is traceabiltiy important? This is because 'words are cheap' therefore everything we do must be traceable such that we are seen to be well organized. Making things we do documented and traceable will also enable us to learn from our own mistakes.

Monday, August 20, 2007

This is 759

Just upgraded this to r759 and testing Tinyau's Tag Rendering plugin early release. It's now working at a 'round edged' box below.

Thursday, August 16, 2007

Looks different?

My first blog post was dated December 2004. I signed up to Blogger.

In September 2005 I switched to hosted WordPress. WP was version 1.5.2 at that time.

Now you are seeing this site running on Habari developer version 0.2.

Tuesday, August 14, 2007

Polishing RoundBox theme

I'm using this site (now taken down) as a testbed to further polish my theme 'RoundBox'.

I have added

  • recent comments back on but in short form

  • site statistics

  • Google ads between posts and Amazon ads at the end
  • Feedburner subscription by email
  • Removed the ugly '[]' brackets from the pagination

I'm also adding a function in the theme.php to generate html tags necessary for the round corners. This would simplify the code in many files by just a few lines in the theme.php.

Recent comments plugin or not

Tinyau gave me valuable comments on this theme. He thinks the 'bottombar' may be of same width of the content. I have to think about that because I may not have sufficient width for the content.

My first attempt for a plugin was to display recent comments. My requirment is very simple, i.e. just display a few (user selectable) comments with links to the post and how long ago that comment was posted. Tinyau has been using a fairly complicated one for his blogs and he introduced that Brian's recent comments plugin to me which Tinyau also ported to Habari. That's far too much for a dummy like me.

I decided to go back to basic. The Habari wiki has a great example to follow. The only addition I did was to add a function to compute the time difference between time() and when the comment was posted to tell 'how long ago'. That function is placed within the CustomTheme class so I just call it like this

customtheme::timediff($comment->date,2,0,'ago ');

where 2nd argument of the timediff function is number of digits, 3rd is for timezone difference and last argument is text to append the output number.

Monday, August 13, 2007

3rd attempt worked

On last Saturday I tried it for the 3rd time. The subdomain is named 'h3' as I may have 4th or 5th attempt.....

It's working here (now taken down). I suspected that it was about rewrite_rules again as the pagination wasn't working. I used the upgrade MySQL queries provided in this this thread and it worked.

From this thread I see that I wasn't the only one reporting this issue with DR0.2 or svn 745 so I guess I have reported something helpful.

Owen mentioned here, when discussing roadmap for 0.3, that rewrite_rules should be taken out of the database I couldn't agree more unless something like a upgrading script (run as a php file with database connection script, password etc filled in by site owner and MySQL commands needed to EMPTY tables and INSERT new rules) is provided everytime changes are made to the rewrite_rules in the database. This is exactly one of my key worries when deciding on migrating my data to Habari.

Friday, August 10, 2007

Getting ready for migration

I have done a few trials last night at my other domain name getting ready to migrate my main site to Habari.

I used shell to checkout latest svn 745 to a new folder named 'hdr02'. I forgot to enable php5 at that domain name so copied the .htaccess file from this domain there. Creating the folder first was a bad move because I should have created a new subdomain for it first. This was later fixed by pointing the subdomain to that subfolder under 'public_html' in cpanel. It worked. This installation was smooth but just before the site was shown there appeared a long page of error right ahead of the K2 theme, that was weird. Navigating in dashboard was OK and I uploaded plugins and themes I wanted. Next was importing from WP, some 8xx posts. That took a while with lots of errors but at the end of the import the page was cleared. This didn't surprise me as I saw similar thing before while importing but that was just a flash due to a much smaller size database.

This site is here (now taken down) which is broken as pagination isn't working and some pages are lost. I took a screenshot of the errors I saw during import.

I decided to repeat the excercise above the proper way, i.e.

  1. Create a new subdomain h745

  2. shell checkout svn 745 to this subfolder

  3. Run Habari installation (still seeing errors ahead of the k2 theme, oops forgot to take a screenshot!)

  4. Import from a WP site (found same imorting errors or to be exact WARNINGS)

The site here (now taken down) is also broken due to pagination not working. Again some pages are gone.

Investigation goes on!

Thursday, August 9, 2007

This is 742

I did upgrading again. I tried shell access and svn checkout command at my hosting.

There was a few hickups but at the end I did it. I also realized that target folder of checked out files was at the wrong place, i.e. same level as "public_html". I may have to try again the proper command to check files out to the correct folder I want.

What I really want is tutorial on svn commands for use in bash.

With the new svn folder I only need config.php and .htaccess files with themes plugins I want to make it work. That is pretty simple and I'm confident now to move my content from WP and transfer domain name.

This is Roundbox 0.3

I have improved (my words of course) this Roundbox theme a litte. The 'all CSS dropdown menu' is outdated therefore not used anymore. I used a 3 column fluid bottombar for menu at the bottom. How does this look?

Link color is also changed as well and it is not that dull now.

I haven't done further work at shell command line last night as I was tired. I think I need to study a bit more before I could find my ways in command line. Found good resources here. Perhaps I need some practice at a local machine first.

Love your enemies

First of all I shouldn't have called them enemies.    They are our teachers people we need to grow, to learn, to progress to.....they are everything you need in life.    AQ, adversary quotient, we all know what it is now but I didn't come to realize it's great effect until after a few events.

We know how to say friends are mirror we need to see the real 'us'.    Very few would consider enemies real friends.    When I was younger I certainly wouldn't say, when I was beaten by these 'friends', I'm grateful to them.    Now I know.

This is again "think the opposite" attitude.

Few years back I was very upset by a super bullying client who believed to have racial superiority here.    It was few years of hard time and very hard work.    The dark years were also complicated by some internal politics which we tried very hard to avoid but failed.

This turned out to be a great lesson.    I have to be grateful to these people we once hated.    We won't have learnt these great lessons and demanded ourselves to perform beyond our capacity if not because of their bullying behaviour.    We won't have the chance to demonstrate our abilities to bystanders who later become our admirer or superior.

When hard time arrives next time welcome it, enjoy it and earn it.   Be grateful to those who send you those treasure.    Stay away from those who said how great you are as words are cheap they are poison in candy wrap.

Tuesday, August 7, 2007

This is h741

This is developer release 0.2 if you want to try here it is.

I know what I did wrong last night, too tired perhaps, during the setting up of this h741 subdomain and have the config.php file pointing to the old database running the original site. What I should have done was to empty the rewrite_rules tables. I thought I have done that but obviously I haven't and I did that again this morning making sure the tables were empty before running the sql queries provided by Chris Davis.

The orginal site running DR 0.1 is still having problem but I don't care as I could now have that folder complete erased and rename this folder h741 to practice this content moving.

I'll do that tonight if I can find the time.

BTW this is my another theme named RoundBox just to celebrate release of 0.2!

This is

This is to document how I moved (not actually, just upgraded Habari) content between versions, not very professional, but worked.

  • Create a subdomain

  • upload DR0.2 files of the latest release or svn

  • create a database and/or user for this temporary installation

  • run Habari installation not necessary in fact see later post

  • replace config.php of with that from the working site of DR0.1 (say

  • use phpmyadmin to empty (not drop) tables for rewrite_rules in database of

  • run SQL queries (download it from here) to INSERT latest rewrite_rules into the database

At this point should be working under DR0.2 pointing to database of Now if your hosting has this then

  • Login into your hosting cpanel

  • point the subdomain document root of to the folder of

  • delete subdomain (just amending server's httpd.conf, content of subfolder should stay normally)

If you are using Tinyau's Flickrrss Plugin you will also have to amend the url of the cache folder in the plugin config page.

Upgrading DONE!

It doesn’t have to be that clumsy

Of course it doesn't have to be that clumsy as I described in last post about upgrading to latest version.

If you have shell access to your hosting account you could use command line like below to check out the latest svn copy to your installation folder.

svn checkout "habari"

I think "habari" should be my installation folder but am not sure as I haven't tried shell access yet perpahs Site5 support will show me how.

By this I think I could always keep my installation fresh with the latest svn copy.

There is always another clumsier way to overwrite all files in the installation folder.