A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service
XAMPP is an open-source, free network server software. After simple installation, you can build a server environment on your PC. This article describes how to install XAMPP (Apache + MySQL + PHP) in windows and how to use it and its related problems.
1. What is XAMPP?
The abbreviation XAMPP (X-system, a-Apache, M-MySQL, p-PHP, p-PHPmyAdmin/perl) indicates the files contained in the XAMPP installation package: Apache Web server, mySQL database, PHP, Perl, FTP service program (filezillaftp) and phpMyAdmin. To put it simply, XAMPP is a server system development kit integrated with Apache + MySQL + PHP. It also includes the phpMyAdmin tool for MySQL management to perform visual operations on MySQL. XAMPP
Can run any program: from personal homepage to fully functional product site (although this is only for development purposes; for security reasons, XAMPP is not suitable for use on product servers ).
2. How to obtain XAMPP
XAMPP is free and can go to the XAMPP website to learn more (http://www.apachefriends.org/zh_cn/xampp.html ). The latest version is 1.7.7, which is applicable
Linux, windows, Mac OS X, and Solaris XAMPP. In Windows, there are three types of file downloads:
Iii. How to install XAMPP in win7
If Wamp has been installed on Windows, uninstall Apache, MySQL, and PHP. Because these are already integrated in XAMPP. The uninstallation method is not described here. Baidu Google. In fact, if the previously used Apache is not an installation version, you do not need to uninstall it. But MySQL is to uninstall, MySQL fully Uninstall a little trouble, here I refer to the uninstall METHOD OF THE Link: http://www.cnblogs.com/85538649/archive/2011/08/03/2126171.html
Installation Method:Installation of the downloaded EXE installation package
Due to the author download is compressed green files (support green light), so no, we hereby provide XAMPP official website Installation Guide web page for reference, web site: http://www.apachefriends.org/zh_cn/xampp-windows.html or http://www.cnblogs.com/bnuvincent/archive/2010/11/09/1872358.html
Installation Method B:Download compressed files
If you do not need an installation package, you can download the 7-zip package or zip package and decompress it to the folder you choose. I decompress the package to drive d, and the decompressed path is D: \ XAMPP, as shown in (click to see the big picture ):
Open the folder where XAMPP is located and run the setup-xampp.bat in it ". This updates the path information in the configuration file.
Press any key to continue. The installation is successful.
4. Start XAMPP and Test
1. Start the XAMPP Console
Double-click the: xampp-control.exe under the XAMPP directory, start the XAMPP console, In this console for Apache and MySQL and other control, such as start and stop ,:
Control Panel settings:
We can see some basic control functions of XAMPP 1.7.2. Note that you are not recommended to register these functions as a service (start upon startup). You can run the software on your own every time you use them, this saves more resources when XAMPP is not used. In other words, personal computers are not used as web servers for a long time. Therefore, you do not need to select the check box before setting SVC in modules. XAMPP in SVC mode will be registered as a Windows system service, apache and MySQL modules are started every time the system starts. To start Apache or MySQL, you only need to open the XAMPP control panel and click Start next to it.
The started running status is displayed. If it is used as a server for a long time, you can consider registering the service.
Some default configurations and related configuration files in XAMPP:
1)The default password for XAMPP MySQL is (this is also the account and password used for phpMyAdmin logon ):
User: Root Password :( null)
2)The default password for XAMPP filezilla FTP is:
User: newuser password: wampp
User: anonymous password: firstname.lastname@example.org
3)The default password of XAMPP mercury is:
Postmaster: Postmaster (Postmaster @ localhost)
Administrator: Admin (admin @ localhost)
Testuser: newuser password: wampp
4)The default password for XAMPP WebDAV is:
User: wampp password: XAMPP
5)The path of the configuration file for the relevant services in XAMPP is:
6)The default path of the XAMPP website root directory is \ XAMPP \ htdocs;
7)What is the default path for storing data in the XAMPP MySQL database? \ XAMPP \ mysql \ data;
2. Test whether XAMPP is successfully installed.
Enter http: // localhost/XAMPP/in the address bar of the browser. If you log on for the first time, select the server language, select Simplified Chinese, and enter the server configuration system interface, as shown in. Installation started successfully:
5. Use phpMyAdmin in XAMPP to manage MySQL databases:
In XAMPP, you can use phpMyAdmin to manage MySQL databases. Before managing MySQL databases, you must use edipluus (a lightweight and powerful text view editor) open the config in the phpMyAdmin folder under the XAMPP installation directory (for example, D: \ XAMPP \ phpMyAdmin. inc. PHP file and make some changes:
/* Authentication type and info */$ cfg ['servers'] [$ I] ['auth _ type'] = 'cooker '; // change config to Cookie $ cfg ['servers'] [$ I] ['user'] = 'root '; $ cfg ['servers'] [$ I] ['Password'] = 'root '; // enter the password $ cfg ['servers'] [$ I] ['extension'] = 'mysql '; $ cfg ['servers'] [$ I] ['allownopassword'] = true;
1,Enter http: // localhost/XAMPP/in the browser address to access the main interface. In the left-side Navigation Pane, select the phpMyAdmin option in the toolbar ,:
2,After you click the phpMyAdmin option, the welcome page of phpMyAdmin is displayed. You are required to enter the user name and password. Here, you can enter the MySQL user name and password and select the language (Simplified Chinese ):
3,Click the "execute" button to go to the page for creating a database.
4. Create a new database:Under the MySQL localhost title, you can create a new database, enter the database name in the first input box, and the character set in the second drop-down box, for more information about character sets, see the character set tab on this page. Select utf8_genneral_ci and click Create to create the database. :
5. Create a database table:
1) create a data table:After the database is created, the system prompts that no table exists in the new database. We recommend that you create a data table immediately. In the name input box, enter the name of the data table, for example, user. The number of fields indicates the number of fields in the Table. Here, I have three fields. :
2) create a table structure:After you click "execute", the page for setting table structures such as field names and field types is displayed. Set fields. after entering the fields, click "save" to create the table:
3) view the table structure:See figure;
4) insert data:After the table is created, you can insert data into the table. Click the insert tab to go To the Add Table record page. If you want to insert multiple data records at a time, you can find and select the number of records to add in the drop-down box, after the data information is filled in, change the insert position of the record to "Insert a new row", and click the "execute" button at the bottom to submit all the information together ,:
5) view data:After adding the record, click the "Browse" tab to insert the data record list under the card ,:
6) delete data:Select the data to be deleted and click Delete.
Vi. XAMPP Security console
As mentioned above, XAMPP is not prepared for the production environment, but serves developers only. To facilitate developers, XAMPP is configured to enable all functions by default. This is very good for the development environment, but it may be disastrous for the production environment. The following is a list of security issues configured by default for XAMPP:
1) The MySQL Administrator (Root) has not set a password.
2)The MySQL Server can be accessed through the network.
3)PhpMyAdmin can be accessed over the network.
4)The sample can be accessed through the network.
5)Users of the mercury email server and filezilla FTP server are public.
Therefore, we should ensure the security of XAMPP before releasing something online. Sometimes, a firewall or an external router is safe enough. First, you can try the "XAMPP Security console" based on the network. The console fixes the vast majority of security vulnerabilities, such as the administrator password of MySQL and phpMyAdmin and the Directory protection of XAMPP. For Mercury Mail Server and filezilla FTP server, remember to change the configuration settings (such as the user name and password ). If you do not need these services, do not start them-this is safe.
VII. XAMPP FAQs
1. Where should I put my network documents?
All network documents are stored in the main folder htdocs (. \ XAMPP \ htdocs ). If you put the test.html file here, you can access it through http: // localhost/test.html. The PHP or cgi files are also stored here. You can create other WWW subfolders in the htdocs directory. For example, if you put test.html in the. \ XAMPP \ htdocs \ new path, you can enter http: // localhost/New/test.html in the address bar of your browser to access this file.
More file features:
2. Can I move XAMPP?
Yes, but only the XAMPP of the zip/7-zip package version is supported. After the move operation, you must run "setup-XAMPP" to update the configuration file. Do not try to install XAMPP in this way. If you are using the installed version of XAMPP, you can copy (rather than move) it and put it in a new path, and then run "setup-XAMPP" to update the configuration file. Try it! :)
3. How do I configure the default start page?
If you access a folder similar to http: // localhost/XAMPP/in a browser, the Apache server automatically returns a default start page. Apache automatically finds an index page similar to index. php. The "directoryindex" command in httpd. conf is responsible for this function. Here you can define the default start page name and protocol. By default, the "directoryindex" command list is as follows:
Index. php index. PhP4 index. php3 index. cgi index. pl index.html index.htm index.html. varindex. phtml
4. How can I switch between PhP5 and PhP4?
XAMPP (non-lite version !) Including PhP5 and PhP4. Use php-switch.bat ($ path-to-XAMPP \ php-switch.bat) to switch the version. Note: Stop the Apache server before switching the version.
5. Where can I change the configuration file?
6. What are these folders?
\ XAMPP \ anonymous FTP sample folder
\ XAMPP \ apache Apache server
\ XAMPP \ cgi-bin executable CGI script
\ XAMPP \ filezillaftp filezilla FTP Server
Main folder of \ XAMPP \ htdocs HTTP document
\ XAMPP \ install is used for XAMPP installation (do not delete it !)
\ XAMPP \ licenses same as above
\ XAMPP \ mercurymail Mercury Mail SMTP POP3 IMAP Server
\ XAMPP \ mysql MySQL Server
\ XAMPP \ Perl
\ XAMPP \ PHP (4 and 5)
\ XAMPP \ phpMyAdmin
\ XAMPP \ Security additional Security Configuration
\ XAMPP \ TMP Temporary Folder
\ XAMPP \ Webalizer network status
\ XAMPP \ WebDAV example
7. XAMPP and system services
For all NT/2000 users, in the respective path of the package, you will find the installation/uninstall file that configures all servers as system services.
8. MySQL and PHP
The "root" user of MySQL has no password by default. Therefore, you can use mysql_connect ("localhost", "root", "") in PHP to connect to the MySQL server; if you want to set a password for the "root" user in MySQL, use the "mysqladmin" command in the console. For example:
\... \ XAMPP \ mysql \ bin \ mysqladmin-u Root Password secret
Note that after you change the root password, do not forget to change the related information in phpMyAdmin. Search for "config. Inc. php" under "\... \ XAMPP \ phpMyAdmin \" and edit the following lines:
$ Cfg ['servers'] [$ I] ['user'] = 'root'; // mysql superuser
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'http'; // HTTP MySQL Authentification
From now on, you must enter the "root" password to start phpMyAdmin.
Start building with 50+ products and up to 12 months usage for Elastic Compute Service