Install Development Environment with XAMPP on Windows PC

xampp logo

Before we start writing PHP code, it is good to install XAMPP package from Apache Friends. XAMPP is a full-featured AMPP (Apache, MySQL, PHP, Perl) and a non-commercial middleware stacks available on Linux. After installation, you can use your local PC or laptop to run web bot or spider scripts, or even test out a full-featured product site, such as Joomla or Wordpress before upload to live server. 

XAMPP is very stable and you can run screen scraping scripts for weeks from your PC without problems, assuming your scripts are clean, no memory leak etc. Domain name and web hosting are not needed to run your PHP/MySQL program on XAMPP. Sometimes you do not even need internet access during script writing.

 

Assuming you are using Windows PC, you can download the latest XAMPP from Apache Friends or get older versions at SourceForge. Each version of XAMPP contains different versions of Apache, MySQl and PHP. One simple way to select XAMPP version is to match as close as possible the PHP version of your live server. Example, my server is using PHP 5.3.x, so I pick XAMPP 1.7.7 to download. If your server is currently using PHP 5.4.x, then you can download XAMPP 1.8.x with close match to your PHP version.

xampp historical versions

If you go to SourceForge, you can see a list of XAMPP package. For this article, I downloaded xampp-win32-1.7.7-VC9-installer.exe (84.9Mb) and double click to start installation process.

xampp version

 You should have the first pop-up requesting you to select a language. Click OK.

xampp select language

 There should be a warning message after that. Click OK.

xampp warning messageNow XAMPP Setup Wizard is displayed. Click Next.

xampp setup messageInstall XAMPP at C:\xampp, so click Next.

xampp installingFollow the default setup, so click Install.

xampp optionsThen you will see files installation in progress. It will take a while.

xampp installation in progressBefore the end of the process, a message box pop up. It will disappear soon.

xampp configurationNow installation process completed. Click Finish.

xampp installation completeClick Yes to start XAMPP control panel.

xampp installation successful

To start using PHP/MySQL from your PC, click the "Start" button of Apache and MySql.

xampp control panel

The buttons change to "Stop" with "Running" next to them. Your XAMPP is ready to use.

activate xampp

Before we start writing code for web spiders, we need additional extension. Go to C:\xampp\php and open up php.ini file to edit.

xampp file list

Find this line:

;extension=php_curl.dll  

uncomment it (remove ";" in front) and save.

We need to use cURL extension later. You need to restart XAMPP by clicking "Stop" buttons for PHP and MySQL at control panel, then press "Start" again.

We are almost ready!! :)

Last modified on Thursday, 03 November 2016 06:39
Rate this item
(0 votes)
back to top