Thursday, December 2, 2010

Getting your computer setup with PHP

For the purposes of these PHP tutorials, we will be using PHP as an Apache module. Depending on your operating system, there are several easy, prepackaged ways to install PHP and Apache.

WINDOWS (Xp, Vista, 7)
Download and install the WAMPSERVER 2 stack. This package will give you PHP, Apache, some interesting PHP addons and a database server, MYSQL.


LINUX* (2.6)
Open up your terminal with root privileges and run the following command

apt-get install apache2 php5 php5-mysql php5-gd mysql-server

*Note: Instructions only for distributions of Linux that have apt as well as a repository that contains LAMP


MAC OS X (Snow Leopard)
Download and install the MAMP stack. This package gives you PHP, Apache, and MYSQL similarly to WAMPSERVER.