Install XAMPP on Windows

In this following XAMPP tutorial, you will learn how to install XAMPP Windows on XP or Win 7. By the end of this tutorial, you will have a fully working and configured XAMPP PHP installation on your Windows system, which will serve as your local Apache web server bundled with PHP (or PERL) and MySQL.

The Windows XAMPP download package is a very useful software package for web developers creating and working with dynamic websites based in PHP and MySQL. This is a critical tutorial for first time users of XAMPP in a Windows operating system environment. Note: If you are using the Ubuntu distribution of Linux and planning to install XAMPP, you can read this tutorial: Installing XAMPP on Ubuntu.

Getting started with XAMPP for Windows:

1. Download the installer here: http://www.apachefriends.org/en/xampp-windows.html

As of February 2011, the latest released version is XAMPP 1.7.4 for Windows. Make sure you click the “Installer” package (file size is around 66MB).

See the screenshot below:

2. Take note of the MD5 checksum of the XAMPP install file you are downloading — you will need it in step four. For example, the MD5 checksum provided on the download page is:

84d88cb5b9471dd8d1d7b7952df9c2bf

3. Download an MD5 checksum checker in Windows — I suggest using http://www.winmd5.com/ — and install the software.

4. Check to ensure the MD5 Checksum is correct:

Double click WinMD5.exe. In the select file, browse to the downloaded XAMPP installer package (e.g. xampp-win32-1.7.4-VC6-installer.exe) and click open. WinMD5 will automatically calculate the MD5 checksum of the downloaded XAMPP installer. Now compare this with the one provided on the XAMPP page (the one you took note of in step two). Paste it into the original MD5 checksum textbox. Then click “Verify.” It should match. See the screenshot below:

windows xampp

The purpose of an MD5 checksum is to check the integrity of the Windows installer to make sure it is not corrupted during the downloading process.

System Requirements:

The installation steps outlined in this tutorial have been tested to run successfully on Windows XP Home Edition Service Pack 3 and 32-bit versions of Windows. To determine whether you are running on a 32-bit or 64-bit Windows system, you can read the tutorial located at: http://support.microsoft.com/kb/827218.  Always remember to keep your Windows system up to date.

XAMPP Windows 1.7.4 contains the following bundled Apache/MySQL and PHP versions:

  • Apache 2.2.17
  • MySQL 5.5.8
  • PHP 5.3.5
  • phpMyAdmin 3.3.9

Most content management systems, such as WordPress — which runs on PHP and MySQL — now have system requirements of at least PHP 5 and MySQL 5. This means that the latest XAMPP installer is up-to-date and lets you run these applications in your XAMPP localhost without any incompatibility issues.

Installing XAMPP

Now that we have completed the preparatory steps for downloading and checking your Windows XAMPP install, let’s actually begin the installation process.

1. Close all open applications in Windows (e.g. browser, Office applications, etc.).

2. Double click the XAMPP installer (e.g. xampp-win32-1.7.4-VC6-installer.exe).

3. Click run and select language. In this tutorial, we will use English as the installer language.

4. You will then see the Setup Wizard of XAMPP. Click next.

5. The setup wizard will ask you where to install XAMPP. If your system drive is Drive C (the main system drive where the Windows OS is installed), the destination folder should be C:xampp

6. You will then be asked to configure the installer. Check the following:

  • Create an XAMPP desktop icon.
  •  Create an Apache friends folder in the start menu.
  • Choose to install Apache as a service.
  • Choose to install MySQL as a server.
  • Choose to install Filezilla as a service.

7. Click “Install.”

XAMPP will then extract all content from the installer package and start the installation process. This may take some time, so be sure not to interrupt the installation process. When you see the message: "XAMPP 1.7.4 has been installed on your computer," click Finish.

Let XAMPP check the ports in your computer; if Windows Firewall is running on your XP or Windows 7 system, it will likely throw some warnings. Just click "Unblock" when asked.

When you see "Service installation finished! Hint: Use the XAMPP control panel to manage services," click OK.

If there are no major errors reported during the installation, you should see "Congratulations! The installation was successful! Start the XAMPP control now?" Click "Yes" and start the Windows XAMPP services. You should then see the XAMPP control panel as shown below:

XAMPP Control Panel

{mospagebreak title=How-To Secure XAMPP from localhost}

Now that the installation is complete, let’s start securing the XAMPP install. Security is the most important configuration set, as you do not need XAMPP to be publicly accessible either within your networks or on the Internet from your localhost install.

Here, we will learn how to secure your Win XAMPP directories and assign passwords. Below are the basic security setup steps:

1. Launch your favorite browser.

2. Enter the following URL in your address bar: http://localhost

3. You should then see the XAMPP splash page. Click "English." You will then see the XAMPP administrator panel, where you can find the XAMPP status and security configuration settings.

4. Click "Security."

5. XAMPP will then perform a security audit in your Windows system and setup. You will likely see errors; do not panic. Since you have not secured your XAMPP installation yet, you will likely see the following warnings:

  • These XAMPP pages are accessible by network for everyone -UNSECURE
  • The MySQL admin user root has NO password – UNSECURE
  • PhpMyAdmin is free accessible by network – UNSECURE
  • The FileZilla FTP password is still ‘wampp’ – UNSECURE
  • PHP is NOT running in "safe mode" – UNSECURE
  • A POP3 server like Mercury Mail is not running or is blocked by a firewall! – Unknown

7. The priority items to be fixed are: Directory Permissions, MySQL Password and PHPMyAdmin. Click the link: http://localhost/security/xamppsecurity.php that appears below the warning messages.

8. Under the MySQL section: “Root” Password, assign a new password and make sure to take note of it by writing it down in a safe location. Select “cookie” for PHPMyAdmin authentication.

Warning: Do NOT check “Save plain password in text file?”

Click “Password Changing.” You should then see: “The root password was successfully changed. Please restart MYSQL for loading these changes!”

9. To restart MySQL, go to the XAMPP Control panel (screenshot shown previously). Click “Stop” for MySQL. This will stop the MySQL service. It should look like the image below:

Click the “Start” button again to restart MySQL and implement your new password settings. If you see “running” under MySQL service, it has successfully restarted.

10. Now go back to the XAMPP security page (http://localhost/security/index.php). Let’s secure the XAMPP directory by implementing “Directory protection (.htaccess).”

First, enter the desired username and password under “XAMPP DIRECTORY PROTECTION (.htaccess).” Take note of these credentials and write them down in a safe location.

Warning: Do NOT check the “Safe plain password in text file?”

Now, click “Make Safe the XAMPP directory.” If the changes are successful, you should see the message:

SUCCESS: The XAMPP directory is protected now! All personal data was saved in the following file:
C:xamppsecurityxampp.users
C:xampphtdocsxampp.htaccess

The password gets encrypted once it is stored in that location.

11. You can stop the “Filezilla” service in the XAMPP Control panel, as it is not required to test applications. The two most important services for developing web applications are Apache and MySQL. These should not be disabled if you want to properly test your applications locally.

{mospagebreak title=Test XAMPP, phpMyAdmin, and Apache Modules}

Let’s conduct a test to see if everything has been installed properly by running a PHP script on your XAMPP local server.

1. Open a notepad text editor (or any PHP editor).

2. Copy and paste the PHP script below to your editor:

<?php
$number1= 5;
$number2= 10;
$sum= $number1 + $number2;
echo ‘The sum of two numbers:’. $sum;
?>

3. Save the file as sum.php to the htdocs folder inside your XAMPP directory. This is how the htdocs folder will look with the sum.php script inside it:

4. To test it in a web browser, navigate to http://localhost.sum.php. This will run the sum.php script in your XAMPP local server.

Once the PHP script executes, you should see the following output:

 
If you see the output without any errors, you can start running PHP scripts in your XAMPP localhost. Note that if you do not save the PHP script inside the htdocs folder, the web browser will not be able to access it.

5. To access your MySQL database (as well as create databases and tables), go to: http://localhost/phpmyadmin/

Log in using your MySQL root credentials: username= root and password (the MySQL root password you configured earlier).

6. You will then see the phpMyAdmin panel (screenshot below):

To connect to your XAMPP MySQL database in your PHP web applications, use the following credentials:

Username: root
Password: your_mysql_root_password
Hostname: localhost

When you are installing and testing a CMS (such as Joomla), you can use the above MySQL credentials.

7. The following are important paths for Apache configuration files, modules and PHP configuration which you might be tweaking for your applications:

  • XAMPP Apache modules path: C:xamppapachemodules 

    Most important modules are enabled by default in XAMPP (such as mod_rewrite). If you add modules, you can use this tutorial as a benchmark: http://mewbies.com/how_to_install_mod_security_for_apache_tutorial.htm

  • Apache configuration file (httpd.conf): C:xamppapacheconf httpd.conf

    You can open this file with Notepad. In most cases you will not need to tweak this configuration file.

  •  PHP configuration file (php.ini) path: C:xamppphpphp.ini
  • This is used to tweak some of your PHP settings (such as turning safe mode ON). Bear in mind that to finally implement any changes to the Apache settings (adding new modules, httpd.conf changes, as well as changes in your php.ini), Apache needs to be restarted in your XAMPP Control Panel (click “Stop” for Apache then click “Start” again).

Troubleshooting the XAMPP Install

MD5 checksum does not match.

Solution: Download the installer again and check the MD5 checksum until it matches exactly. Do not proceed to the installation process until it matches.

Apache server won’t start conflict at Port 80. (Port 80 in use)

Solution: Make sure you do not have any local host servers running on your Windows computer. This will ensure those ports are used solely by XAMPP.

If you need to run another local host server (such as Visual Web Developer), make sure they are running at different port numbers. Usually Port 80 is recommended for XAMPP as the default port for Apache.

My installation still does not work.

Solution: Make sure you comply with the system requirements and that no other conflicting services are running on your computer. For example, are anti-virus programs running? Make sure to turn these or any other applications that may be blocking your installation off.

[gp-comments width="770" linklove="off" ]
antalya escort bayan antalya escort bayan