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
- phpMyAdmin for managing the MySql database Server
- FileZilla FTP Server
- Mercury Mail Transport System
- Run XAMPP Control Panel and start the Apache and MySql services.
- Open Url
- 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
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.