If you are a php web developer or want to be, it is a must that you need to have a testing environment. A testing environment means you have our own local server and test and run your application that you are developing before you go live on your production server. You need to develop, and testing your application in your local rather than testing it in your production server.
So to have your local server in Windows environment you can use XAMPP. XAMPP is a free and open source cross-platform web server package, consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl programming languages. With XAMPP you can have web server, database server, ftp server and mail server, all in one place. And XAMPP work on linux, windows and mac. What else do you need?
To install XAMPP on your Windows:
- Download XAMPP for Windows
- Extract it anywhere you like.
- Open the folder, and double click setup_xampp.bat file.
- You will be ask a series of questions. Tt just a y/n answer, you can choose ‘y’ for all as default.
- The setup will now relocate XAMPP to the correct path if required. Once you see the ‘XAMPP is ready to use’ message, hit Enter to continue.
- Next you will see a message informing the time zone that was set in php.ini file. Again hit Enter to continue.
- In the last step of the installation, you are given various choices, amongst which the first one is to start the XAMPP control panel. Note that even if you exit the set up at this point by entering x, you can always start the XAMPP control panel either from Start Menu or desktop shortcut.
To Run XAMPP:
- Double click the xampp desktop shortcut or from program menu
- You will see the windows like the screenshot below:
- Start Apache and MySQL to have your own web server. For other service like Filezilla FTP server or Mercury mail server you can start it as well according to your need.
- You may need to unblock the port 80 and 3306 from your firewall.
- Test it http://localhost in your web browser.
- To access PhpMyAdmin, just go to http://localhost/phpmyadmin
So now you have your local server environment. It is very much like your production server. So develop and test your application or web design before you go live.