Setup Apache, PHP & MySQL in CentOS

I am trying out new VPS package. It’s from DMEHosting. Just for 3 dollar for first month. But since I am totally new to this VPS, I manage to screw it up within first 30 minutes.

In 30 minutes I apparently did rebuild the VPS 2 times. Reboot it for about 6 times. Boot it back 3 times. And the result it, I can’t access it. LOL. I submit a ticket, and it was resolved within 30 minutes. Tech support reply my ticket with “please don’t do multiple rebuild and reboot at the same time”.

Anyway, I settle down for CentOS 5. Particularly selecting with VNC so I can access its GUI when it’s needed. But for the time being SSH is all I need.

First the default OS comes with Apache already install (httpd). So all I did is ” yum groupinstall “MySQL Database” “. Then I found out that it did not have php installed by default so I run “yum install php-mysql” which it just nice.

But when browsing by browser, php is not rendered as PHP page instead it shows source code. Oh Shi*!

I google around and I found this site

From there I remove back what I previously install and run this command instead. I also remove default installed httpd by issuing “yum erase httpd”

yum install httpd

yum install php

yum install mysql-server mysql

service httpd start

service mysqld start

After that all run nicely :) Welcome to CentOS world!

Update on 17 Nov 2010: I forgot to install one important thing.

yum install php-mysql

This is to make sure php can communicate with mysql (or actually means load its extension). From there you might want to consider installing this too:

yum install php-mcrypt

yum install php-gd

php-mcrypt to make sure your phpmyadmin run without any error notification. php-gd is for you to use with image manipulation, particularly to generate captcha image.

Masjid Tuanku Mizan Zainal Abidin (Masjid Besi)

Today I was able to go for friday prayer at Masjid Tuanku Mizan Zainal Abidin. Thanks to my garmin gps I am manage to go around the masjid by car without finding the parking entrance … lol.

Remind: Update garmin map

In my mind…. How great we the man of earth, the khalifah able to build something like this. Just imagine our greatness is just a drop of water to the sea compared to Allah greatness.

Wudhu Place

Stairs to Prayer Hall

View from side

Kubah

Panorama View

For Sale: Sony Ericsson Vivaz PRO

Sony Ericsson Vivaz PRO for only RM 1000 and it come with 8GB microSD memory card also 15 month warranty from COMSAT. Yes! It is an AP set.

As usual I do my deal mainly through COD. You can meet me up at Kampung Baru, Kuala Lumpur or Bandar Contry Homes, Rawang. Other places are any train station within Kuala Lumpur.

I only accept CASH. Either by bank transfer or direct handover.

You can contact me by call or sms to 012-5087870 or leave a comment here with your email ok.

This is the real set in hand (click to view larger image)

<a href=”http://img59.imageshack.us/i/dsc00017dj.jpg/” target=”_blank”><img src=”http://img59.imageshack.us/img59/3816/dsc00017dj.th.jpg” border=”0″/></a>

Can you live outside KL but work in KL ?

I try to analyze the data. Are we able to work at KL but live outside KL? Well given that house price in KL is too expensive to buy, more than affordable for rental. But the prices is way lower should you go far out of KL. For example like the place I am living now, Rawang.

But does the cheaper price of houses justify the travelling cost included?

Lets do the math.

For example the current job that I applied, the work days is 6 days a week. That means working on saturday. Lets take out our calculator.

First is travel by car. Assuming you already own one. The cost involve is:

  • Fuel: RM10 daily (back and forth about RM60/week)
  • Toll: RM7.20 daily (back and forth)
  • Parking: RM3 ~ RM6 daily/entry (depend on where the parking lot is)
  • Total daily is: RM20.20 ~ 23.20
  • Total monthly: RM464.60 ~ 533.60 (assuming 23 days work per month)

Second is to travel by public transport

  • Bus: RM2.40 daily (back and forth to Rawang KTM station)
  • Train: RM6.60 daily (back and forth Rawang – KL)
  • Total daily: RM9.00
  • Total monthly: RM207

But if you were to take normal road and find free parking, the cost by traveling with car is just RM10 for fuel. Unless you stuck on long hours jam and risk of empty fuel tank… You’re force to re-fill petrol and it will cost more than RM10 daily. So the monthly cost is around RM230++ but you got to go early to grab the free parking space.

The other things is you can’t predict anything to happen everyday. You could be facing on heavy traffic jam. You also could be facing with problematic KTM train. Both will make you arrive late for work. At least in your own car, you still looks ok. In tin sardine KTM and delayed, you would looks like…. uh! And smell… (especially going back home).

Parking in KL is terrible. If your company got adequate parking at the building, maybe driving your own car wouldnt be a problem. Or you could just paid for monthly parking at any parking lot.

I would say taking public transport is the cheapest way to go. But once reach KL, you need to walk a bit to go to your workplace. It does help if your workplace is closer to any train station. On bright day I will enjoy walking to my office. On a rainy day… Not as much. Need to bring extra shoes… And umbrella of course :)

Utorrent 2.0.1 Slow in Download

Before this I am using UTorrent 1.8.5 and download speed is great. Max out my 2Mbps DSL connection (around 200kbps++). So when new upgrade available, I happily upgrade to new version. Little did I know what it come with…

The download speed is very slow. Rarely reach even 100kbps. Most of the time around 50kbps only. I am tired of waiting… I try to download torrent with more seed. But it still wont go up to the old speed. Now I start to Googling around.

I found the tips in UTorrent own forum.

Go to your Preferences (Options -> Preferences or Ctrl + P)

Then change the value in Advanced.

bt.transp_disposition from the default 31 (default value on mine) to 5 (as suggested by one of the forumer).

After that, the speed of download increase to a bit around 150kbps… But still drop back to 50kbps sometimes. So this one does not solve the problem totally.

Then one more forumer suggested that change the value of net.calc_overhead. From True to False.

The new version of UTorrent is somehow limit the download speed to the rate of limited upload rate. So if your upload rate is 5kbps like what I said, you’ll get 50kbps download speed.

This setting will disable that options. So you will get your full download speed :) Nice!

Or you can just increase the upload speed limit to get more download speed. Or you can always downgrade to older version of UTorrent.

Type of Middleware

RPC

  • Remote Procedure Call
  • Asynchronous and Synchronous
  • Client make call to procedure running in remote system

Message Oriented Middleware

Message sent to client is collected and stored until they’re acted upon

SQL-Oriented Data Access

Between application and database

Embedded Middleware

Communication service between embedded application and real time operating system

Middleware

What is middleware?

Software layer that lies between the operating system and the application on each site of the system

Middleware Functions:

Hiding distribution

Make of many part running in distributed location

Hiding the heterogeneity of various hardware components, operating system and communication protocol

Provide uniform, standard, high level interface to the application developer and integrator

Application can easily be composed, versed, ported and made to interoperate

Supply set of common service

Perform various general purpose functions such as

  • Avoid duplicating effort
  • Facilitate collaboration between application

Corba Stubs and Skeleton

Defining Corba Stubs and Skeleton is defining ORB stubs and skeleton

Basically Stubs is at client, Skeleton is at server.

Stubs has no problem meshing perfectly with the skeleton at server.

Even if different programming language

Even if different ORB by different vendor

Why is that ?

Because IDL define the interface so strictly that every programming language and vendor must follow the standard, thus having no problem in compatibility with different language or vendor.