Starting PHP

It’s been some long time since I touched upon PHP, and I wanted to write a small web application using PHP and MySQL. It took me almost half a day just to setup my environment. I first started by individually installing each of PHP, Apache Web Server, MySql and PhpMyAdmin, and then modifying some configuration files to make them work together. This took some time, and I still had some problems. So I gave up on it and decided to use one of those integrated packages (WAMPs) that get everything setup for you, and it was well worth it.

Follow the below instructions to save yourself some research time and be ready in half an hour.

Preparing PHP Environment

Install latest version of XAMPP, which contains:

  • Apache HTTPD Web Server + Openssl
  • MySQL Database Server
  • PHP
  • phpMyAdmin for managing the MySql database Server
  • FileZilla FTP Server
  • Mercury Mail Transport System

Why XAMPP? Click here for a Comparison of the available WAMPs (Windows, Apache, MySQL, PHP).


  • Run XAMPP Control Panel and start the Apache and MySql services.
  • Open Url http://localhost.
  • The main folder for all WWW documents is at \xampp\htdocs. To test for a PHP page, create new file phpinfo.php with only the following content <?PHP phpinfo(); ?> and place it under \xampp\htdocs. Then go to web browser, and type http://localhost/phpinfo.php in the address bar.

That’s all you need to know before you put yourself into development mode. Click here if you want to explore other installation methods.

Editing PHP Files

If you are already familiar with Eclipse, I suggest you download the Eclipse plugin for PHP in order to use Eclipse as your PHP IDE. Otherwise, Notepad++ is a nice multi-tabbed editor. Don’t worry, both are GREAT and FREE.

Ali B


One thought on “Starting PHP

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s