Installing XAMPP
From InstallationWiki
| Official Page |
| Project Documentation |
| Download |
|
XAMPP is a package created by Apache Friends (http://www.apachefriends.org), which includes Apache, PHP, MySQL, phpMyAdmin, and many other goodies. If you don’t have these already installed on your machine, the easiest way to have them running is to install XAMPP. This article quickly describes the steps you should follow to install XAMPP on a Windows machine.
1. Visit the ApacheFriends XAMPP page for Windows.
2. Download the XAMPP installer package, which should be an executable file named like xampp-win32-version-installer.exe.
3. Execute the installer executable. When asked, choose to install Apache and MySQL as services, as shown in Figure 1. Then click Install.
4. You’ll be asked to confirm the installation of each of these as services. Don’t install the FileZilla FTP Server service unless you need it for particular purposes (you don’t need it for this book), but do install Apache and MySQL as services.
TIP
Note that you can’t have more web servers working on port 80 (the default port used for HTTP communication). If you already have a web server on your machine, such as IIS, you should either make it use another port, uninstall it, or deactivate it. Otherwise, Apache won’t work. The exercises in this book assume that your Apache server works on port 80; they may not work otherwise.
5. In the end, confirm the execution of the XAMPP Control Panel, which can be used for administering the installed services. Figure 2 shows the XAMPP Control Panel.
TIP
The XAMPP Control Panel is particularly useful when you need to stop or start the Apache server. Every time you make a change to the Apache configuration files, you’ll need to restart Apache.
6. To test that Apache installed correctly, load http://localhost/ using your web browser. An XAMPP welcome screen like the one in Figure 3 should load.
7. Finally, after you’ve tested that both Apache and PHP work, if this is your development machine it’s recommended to turn on PHP error reporting. Apache logs errors in a file named error.log, located in the xampp\apache\logs folder; looking at the latest entries of this file when something goes wrong with your application can be very helpful at times. To enable PHP error reporting, open for editing the php.ini configuration file, located by default in the xampp\apache\bin\ folder. There, locate this entry:
display_errors = Off
and change it to:
display_errors = On
8. To configure what kind of errors you want reported, you can alter the value of the PHP error_reporting value. We recommend the following setting to report all errors, except for PHP notices:
error_reporting = E_ALL & ~E_NOTICE
[edit] Additional References
- For step by step instructions, click here
That was all. Have fun working with Apache, PHP, and MySQL!
[edit] Source
The source of this content is Chapter 2: Installing XAMPP of The PEAR Installer Manifesto by Markus Feilner (Packt Publishing, 2008).
