to Live IS to Fight
 

MAC OS: Run PHP + MySQL in console

At the moment, I am writing a small application, which is intended to run in command line mode of Mac OS, and it requried a database connection. PHP is shipped with Leopard however MySQL isn’t. Then, I install XAMPP for a complete package. However, when I use Text Mate to write and test, it didn’t run correctly. It informed that “Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock“. It’s quite werid, I did remembered that I turned MySQL server on already, so what happened here while I can still see my script in browser ? Just a while, actually, because the builti-in PHP recognized the wrong MySQL Sock path, so I need to correct it by doing this command:

ln -s /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock mysql.sock

This command created a symbolick link to MySQL socket in the XAMPP directory. And it worked. Simple trick but very useful.

How I bulid my home entertainment centre

One of my passion is watching movies, I love action, thriller, adventures, sci-fi even some anime. So I always think about to build a theater system at my home to relax at the weekend. Finally, I can make it this weekend. With a limited budget, I need to carefully select the best parts to gather:

Player/Sound system/Ampli: when I went around electronic consumer store, a lot of famous brand names, BOSE, Harman & Kardon, Altec Lansing … but the price is so damn expensive. Then, I paid attention to a Panasonic home theater player with 5.1 sound, supports HDTV, HDMI output and the most fantastic is a iPod dock with a price about $500 and it can be an ampli also. The quality of sound is really nice, with powerful bass/treble and 3D effect. What I can expect more with that price ? I did choose SC-PT565 model. However, this couldn’t be my best choice because its USB supported functions seems a nightmare. I tried many types, from a HP USB stick to the mobile hard disk Transcend but none of them are connected to this player. More than that, the remote control is not really sensitive, if I don’t aim straight forward to the player, it will be useless. continue

Hosting 1.0 and 2.0

Just read the article from TechCrunch about “Yahoot Quietly Pulls the Plug on Geocities“, and I feel it likes the ending point for what we call hosting 1.0. Actually, since a kid I started doing some websites, and at that time, paid hosting was expensive and even I can’t pay because I didn’t have credit card. However, how can I practice and discover about web development / design, GeoCities and other free hosting services were life-savers. I registered a number of those services. Usually, they just offered users about 50Mb – 100Mb with very limited functions and bandwidth, some required members put the advertising banners. At that period, free web hosting is always the hot topics in tech/internet geek community because almost them (and me either) are very interested in internet but can’t afford to maintain a website just for fun. Nowadays, many of them are disappeared. About the paid service such as ThePlanet, BlueHost or 1and1 hosting, they offered shared hosting or dedicated servers. Shared hosting is cheap but easy to face bottle-neck problem when too many users are using at the same time. Dedicated server seems to be luxury for personal ro small business site. I can call this era like hosting 1.0.

continue