XAMPP is an installation package that integrates the Apache web server with PHP, Perl and MySQL, allowing users to easily create a web server on their own computers. Using XAMPP you can easily debug your PHP program, CMS and wordpress blog program locally. This article mainly shares the usage tutorial of XAMPP.
How to use XAMPP
1. Download XAMPP
First download XAMPP. You can directly click on the link provided at the bottom of this page to download from the official website.
2. Install XAMPP
I am using the Windows version of XAMPP installation package. You can install it directly after downloading. All options during the installation process can be kept as default. It is recommended not to install directly on the C drive. After the installation process is complete, you will find XAMPP under the Start/Programs/XAMPP menu. You can use the XAMPP control panel to start/stop all services or install/uninstall all services.
3. Configure XAMPP
Enter in the browser: http://localhost or http://127.0.0.1 to view Go to the XAMPP welcome screen. If an error occurs, please check whether you have installed similar software before, such as dedecms and dedeampz. There may be some conflicts if they coexist. Stop the running of these software or uninstall it directly.
4. Modify the phpMyAdmin configuration
First use relevant software to open the config.inc.php file located in the D:/xampp/phpMyAdmin folder.
Search
[
'Servers'
]
[
$i
]
[
'auth_type'
]
=
'config'
;
5. Log in to XAMPP
Enter the phpmyadmin interface through the phpmyadmin navigation bar on the left side of the default homepage http://localhost. You can directly enter the web login interface through http: //localhost/phpmyadmin/. Enter the user name root and click login directly (the password is empty by default).
Note: By default, phpmyadmin has two usernames, namely pma and root. Among them, root is the administrator identity, and pma is the ordinary user identity, but both have no password by default.
6. Create a new administrator account and delete the original root account
First enter the permissions tab, click on the root account to edit its permissions, and only enter the corresponding user name and password, and keep the other options with their default values. After confirmation, a new account with the same permissions as the original root account will be generated; then, edit the permissions of the root account again, and select "Change login information/Copy user" at the bottom. "Delete old user from user table", the other options remain unchanged, and the original root account can be deleted after confirmation. Yuanzi operates this way for security reasons. It is not recommended to use the root user. It is best to create a new user with all functions to manage the database.
7. Change the pma account password
is similar to root, but there will be an error message when changing the account. At this time, use relevant software to change the 63rd line of config.inc.php The pma password change corresponds to the web settings. At this time, there will be no more login errors. The pma password can be left blank. It would be nice not to have to use him.
After the above configuration, the basic configuration of xampp has been completed. Please remember that the root directory of your site is the htdocs folder under the xampp directory. You can create any site in the htdocs directory. For example, if you place test.html under the path ./xampp/htdocs/new, you can enter http://localhost/new/test.html in the browser's address bar to access this file.
Issues that need attention
1. Administrator passwords such as root do not need to be changed in config.inc.php.
2. Only when pma does not set a password, the status of the MySQL database in the XAMPP main interface will be displayed as ACTIVATED!
3. Do not use the mysql management software that comes with XAMPP for Windows Version 1.5.2 to set it up. If set, a my.ini file will be generated in the C:/windows directory. If you want to reinstall, you need to delete this my.ini file to avoid affecting subsequent settings.
4. Please change the default port if necessary. The default port of APACHE is 80. If you have IIS installed, there will be a conflict. So, a port needs to be changed. Open xampp/apache/conf/httpd.conf and change listen 80 to other ports, such as 99, 8080, etc.
5. You may encounter the problem that xampp is installed and can be accessed through localhost and IP on this machine, but cannot be accessed by other machines in the LAN. The solution is: modify xampp/apache/httpd.conf, change Listen 80 to Listen 192.168.0.188:80, and replace 192.168.0.188 with your server’s IP.