XAMPP: Apache, MySQL and PHP on linux

Tips N Tricks January 17th, 2010

For those who do not want to configure their own webserver, sql server and modules to quickly test a random PHP code, XAMPP provides an easy bundled package to get things up and running quickly.

Adding apache server in your linux installation is easy using XAMPP. It was earlier called LAMPP and is now being called the XAMPP. The understanding is that

it stands for X (linux), A (apache), M (mysql), Php (php).

This is a nice way to develop php websites locally on your computer before wanting to deploy it online. You can even make your server visible to the internet by putting XAMPP online and open to the Internet. Doing that will allow you to run your own server. Some help from DynDNS will help you map a domain name to the ip address of your XAMPP on your computer. These will not be discussed here but lets continue towards linux installation of XAMPP.

Steps :

1) Download the XAMPP package:

Download XAMPP.

2) (Important) Extract ONLY using the following command

sudo tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt

Warning: Please use only this command to install XAMPP. DON’T use any Microsoft Windows tools to extract the archive, it won’t work.

Good News: XAMPP is now installed below the /opt/lampp directory.

3) Start the server using :

/opt/lampp/lampp start

Good News if you see :
Starting XAMPP x.x.x…
LAMPP: Starting Apache…
LAMPP: Starting MySQL…
LAMPP started.

4) Test the server by opening firefox and typing

http://localhost

The document root will be called “www” in the /opt/lampp folder.

Send exe files in gmail

Tips N Tricks January 9th, 2010

Trying to send an exe file in Gmail throws up an error saying that your email cannot be sent with the attachment as it is a security risk to Gmail. The easy way out is to hide the extension.

Solution : 1

Rename the ABC.exe to ABC.txt . Attach the ABC.txt file in your Gmail and do the reverse at the receiving end.

Solution : 2

Use Winrar/Winzip/etc and make ABC.exe to ABC.rar/ABC.zip/etc.zip before sending.

Once you receive the file from the mail just reverse the step. Either change the extension of unzip the file.

Database design tutorial : UML, SQL & Normalization

Programming January 7th, 2010

Numerous websites online offer tutorials on database designing. Some specifically detail php+Mysql usage. While there are numerous aspects of a database driven website, the two most important aspects are design and implementation. While most websites teach you how to write effective sql queries, not many teach you the art of design.

Tom Jewett form Department of Computer Engineering and Computer California State University, Long Beach has a gem of a website that talks about database design.

It it one of the best references available if you are looking to learn the fundamentals of database design or just refresh your sql skills.

Database design tutorial

Site: http://www.tomjewett.com/

DB Design, UML,SQL, 3rd Edition.

Brightness not working : X60 + Mandriva + Thinkpad

Tips N Tricks January 7th, 2010

The issue is to tacked the functioning of brightness control on a Lenovo thinkpad X60 tablet PC running mandriva 2007 spring edition. The feature of screen brightness control does not work out of the box and a small tweak must be done in order to get that working.

Issue:

Brightness control not working in X60 tablet on Linux (mandriva)

Solution:

1) Obtain root privileges using “su root” from your terminal. Provide the password when prompted.
2) cd /etc
3) vi modprobe.conf
4) Add the line “alias video off”
5) use “!wq” to save and exit.

Reboot the computer and your brightness control should start working. Also install the thinkpad button support package from your package manager on Linux to increase compatibility of Linux with thinkpad laptops.