Home About

 January 8th, 2009

Using the Moonlight plugin to watch a little Silverlight - Comments Off

Using Moonlight to watch Silverlight

In early December 2008 Moonlight 1.0 beta was released by the Mono team, making it possible to run  basic Silverlight 1.0 applications from your Linux Firefox installation. If you are like me mostly working on a Linux workstation, then its likely that you have seen little so far of the Microsoft Silverlight platform. The best way to think of Silverlight 1.0 is as Flash, but then by Microsoft. Similar to Flash, Silverlight installs as a web browser plugin and provides animation, graphics and audio/video. The next generation (Silverlight 2.0) includes support for running C# managed code from the plugin which should make things quite interesting.

Read the rest of this entry »

 December 3rd, 2008

Setting up Ubuntu for Web development - Comments Off

One of the pleasures of setting up a new machine for development is always the feeling of having a “clean” machine without a myriad of test projects and things under development laying around the place. This article is distilled from my notes as I installed Apache2, MySQL & PHP5 on my new machine. And of course I tuned PHP5 by compiling and installing eaccelerator.

Installing Apache2 , MySQL Server and PHP5

The above has become so easy under Ubuntu that its quite unbelievable. With just a few lines of typing you too can have a full LAMP (Linux, Apache, MySQL & PHP) system. There is no need for the hours previously spend on hunting for dependencies to download and compile.

sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5 php5-mysql php5-cli php5-dev
php -v

As a bonus: I also installed my favorite HTML editor: BlueFish

sudo apt-get install bluefish

And that is it really — everything works from here on. If you would like to get a bit more juice out of PHP5 you can also add the following:

Configure PHP5 with eaccelerator

PHP is a great language for building websites but it can be quite slow at times. Each time a script is run PHP needs to compile it and then execute it. You can gain speed by using a cache such as eaccelerator. This stores the compiled scripts in both memory and on disk so that frequently called scripts run much faster.

The following steps compile and install eacelerator, you can check for a newer version on the eacellerator website.

sudo apt-get install build-essential
cd /tmp
wget http://bart.eaccelerator.net/source/
bzip2 -cd eaccelerator- | tar xf –
cd eaccelerator-
sudo make install

After the above you should now have a file named eaccelerator.so in directory/usr/lib/php5/20060613+lfs/ (or whatever directory was printed when you did ‘make install’).

Now you need to configure php to include the eacelerator module on startup by editing the relevant php.ini file:

sudo gedit /etc/php5/apache2/php.ini

Add the following lines to the php.ini file:

; Installing the ZEND extension

Finally we need to create the cache directory used by eaccelerator to store the compiled scripts:

cd /var/local
sudo mkdir eaccelerator
sudo chown root:www-data /var/local/eaccelerator/
sudo chmod u=rwx,g=rwx,o= /var/local/eaccelerator/

Restart Apache2 and see if it loads correctly:

sudo apache2ctl configtest
sudo apache2ctl graceful

Test the PHP5 installation

Create a small file in “/var/www/” to test your PHP5 installation

sudo gedit /var/www/php5.php

And add the following in this file:

Now load http://localhost/php5.html to see if your system is correctly configured. If eaccelerator is properly configured it should also be listed here.

 September 26th, 2008

Google Chrome Advertising in Taipei - 1

Google obviously wasn’t waiting for community generated “buzz” for launching their Chrome web browser. On a busy corner of ChungHsiao E Rd in Taipei they put up a massive billboard promoting it. The TV is doing a visual demo of Google products such as Google Earth.

Most popular
Recent Comments
  • ARS: great plugin! I love it! but, it will be so nice if you can add attribute ‘title’ as one of...
  • Nelson: Saved me from doing it myself. Good article.
  • andy: i am currently playing taiwanese server wow in 奈辛瓦里(PVP) and i would like to realm transfer to somewhere there...
  • berties: any english speaking playing on a taiwanese server?
  • web application development: has C# search volume really so constant over the years? really surprising.