What is XAMPP?
Xampp is a Web server creator with built-in Apache, PHP, MySQL, FTP Server, Mail Server, phpMyAdmin, and tools like phpMyAdmin. Unlike Appserv, Xampp has a quite convenient management program, allowing to proactively turn on / off or restart server services at any time.
- Download and install the file, for example: xampp-win32-5.6.24-1-VC11-installer.exe
- Double click the downloaded file (or run as administrator by right-clicking on the downloaded file> Run as administrator), if your computer has a virus browser, a dialog box "Question" will appear, no need to worry, just choose "Yes":
- Immediately followed by a dialog box "Warning" about the User control, if you run as administrator, you do not need to pay attention to this warning, select "Ok" to continue, if you want to be more secure, you just choose to install. XAMPP is in a drive other than the one where Windows is installed (select the drive in the Setup - Installation folder step).
Setup - XAMPP
- Welcome screen of setup then click "Next"
Setup - Select Components
- At this screen select the applications attached to the XAMPP suite, you can remove the unnecessary parts, but just select all and "Next", because you will have the opportunity to use it later.
Setup - Installation folder
- Select the directory to install, containing the XAMPP directory, usually leave C:\xampp as default.
Setup - Bitnami for XAMPP
- About the Bitnami integrator for XAMPP, if you want to see an introduction, click on "Learn more about Bitnami for XAMPP", otherwise uncheck it.
Setup - Ready to Install
- The preliminary preparation steps are complete, now click "Next" to install.
Setup - Welcome to XAMPP!
- Here is the installation screen, just wait until it is finished to be able to use XAMPP.
Start Apache and MySQL
Installation is complete
- Here is the first interface after successful XAMPP installation.
- Under "Actions" click on the 2 "Start" buttons of "Apache" and "MySQL" respectively to launch the two applications.
- Normally, when the installation is completed, it is easy to get an error that cannot start Apache, the most common cause is due to the port 80 conflict, this port has many priority programs running, such as Skype, IIS, World Wide Web Publishing Service, HTTP Server API, ...
- The workaround is to shut down the above programs and then restart Apache.
- Skype, IIS, or HTTP Server API, ... close the corresponding application.
- World Wide Web Publishing service, press the key combination: Window + R> type services.msc > look in the dialog box that appears "World Wide Web Publishing Service"> right click and choose "Stop".
- After shutting down the corresponding application, click "Start" to restart Apache, the screen shown below is successful.
- Type on the browser http://localhost if the word "It works!" (or display the Xampp dashboard), you have successfully installed.
- phpMyAdmin is already built into the Xampp installer, so when Xampp is installed, you can use phpMyAdmin.
- Click on the "Admin" button corresponding to "MySQL" to open the phpMyAdmin page
- The operating directory from here on is C:\xampp\htdocs
- For example, you have a project contained in a folder called "myproject", copy this folder to the working directory on XAMPP, we have C:\xampp\htdocs\myproject\
- To run the files in this project, you need to type in the browser http://localhost/myproject / then if there is no index file, the files or folders inside will be listed fully.
- Continue to try to create the file hello-world.php with the content inside is the PHP code
<?php echo "Hello World!"; ?>
- Then type on the browser http: //localhost/myproject/hello-world.php we will see the results as below:
Theo Học Web chuẩn.