Posts Tagged ‘ PDT ’

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).

Using XAMPP

  • 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.

Enjoy!
Ali B

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: