Solution to Apache failure in Xampp

Source: Internet
Author: User
: This article describes how to solve Apache failure in Xampp. For more information about PHP tutorials, see. Xampp (apache + Mysql+ Php + perl) is a powerful website integration software package. Many people use their own experience to realize that installing Apache server is not easy. If you want to add MySQL, PHP, and Perl, it is even harder. Xampp can be used to easily build runtime environments for php and other programs in various systems.

Xampp is easy to get and install. you only need to visit the following website:
Http://www.apachefriends.org/zh_cn/xampp.html to download xampp, I installed windows Installer installation package, as long as according to its installation tips all the way to install it, very convenient and fast.
However, it is best to select a disk other than disk C in the installation directory. according to some netizens' experience, if you select disk C for installation in Windonws7 or Vista, due to permission reasons, some files may fail to be created. If you already have the highest permissions, you can directly install it on disk C.
In windows XP or windows 7, the apache server cannot be started after xampp is installed.

Today, when xampp is used to modify wordpress, a serious problem is found. apache cannot be started. no matter how many times you click start, the following is displayed:
Busy...
Apache started [port 80]
After querying data from multiple parties, it turns out that port 80 is occupied by other programs, so this port is very busy, which causes apache to fail to start. Solution 1:
1. run-cmd, enter netstat-ano, and press enter;
2. check that the local address contains the pid of the line xx. xx: 80, which is a few numbers. write down these numbers;
3. start "task manager"-"details" and find the corresponding "PID" and "End Task ";
4. check the program corresponding to the pid. it is easy to find that it occupies port 80;
5. stop it directly or use the optimization master or other tools to make it not start.
Okay, you can use it.
Solution 2: Change the port (try not to use port 0-1023, which is reserved by the system)
The iis server used by asp is the default web80 port of xp, and the tomcat server used by jsp is the default port 8080 during tomcat installation, in php, I will change the default port 80 of apache in xampp to 8081 (any other port can be used as long as it is not occupied). other ports won't be OK.
In this case, how can I modify the apache port? Go to the installation directory of xampp and click apache \ conf to view "httpd. conf file, open it with the text recorder, change all 80 to 8081, Listen 80-> Listen 8081
ServerName localhost: 80-> ServerName localhost: 8081
Then restart apache in XAMPP Control Panel.
How can this problem be solved:
Busy...
Apache started [port 80]
In ie, enter the address http: // localhost: 8081 for testing. if the port cannot be opened, modify the apache port and try to stop the iis web service. Restart
Apache. It is also shown as follows:
Busy...
Apache started [port 80]
Enter the address http: // localhost: 8081 in ie to test. the xampp webpage is successfully opened and the prompt is:
Welcome to XAMPP for Windows Version 1.7.0!
Congratulations:
You have successfully installed XAMPP!
Although the xampp-control dialog box shows that apache started port 80, the actual occupied Port is 8081. Restart the iis service. Both apache and iis can work on ports 8081 and 80.
Restart the computer, and apache becomes unavailable again. try to disable the iis service, start apache-> http: // localhost: 8081, and then start the iis service,
Http: // localhost: 8081 test successful
It is really a strange debugging process. In any case, it can be used,
Start apache directly using xampp \ apache_start.bat, and a message is displayed, indicating that port 443 is occupied. Originally, IIS occupies the ssl port (that is, port 443 https), which is easy to do, modify the xampp \ apache \ conf \ extra \ httpd-ssl.conf file, change all 443 to 4433 or disable the ssl service, and test again.
Of course, if you do not need the ssl service as a development and debugging environment, you can disable the ssl service by modifying xampp \ apache \ conf \ httpd. conf file, find "Includeconf/extra/httpd-ssl.conf" with # Character comment out to close the ssl service.
The xampp debugging process is completed while writing, and the idea is messy ......
Solutions to common problems:
When xampp is used to start apache, busy and apachestarted are Prompted. started is prompted, but the status after the apache server does not show running, indicating that the startup is successful.
Solution:
1. start apache on the xampp control panel.
2. go to the apache Directory under the installation directory of xampp, such as c: \ xampp \ apache \ logs \
3. an error. log file is displayed.
4. open the file. at the end of the file, you can learn in detail the cause of startup failure.
5. seek solutions for different causes of failure.
Solutions
1. failed to start apache on xampp control panel
2. go to error. log to view the information and display "make_sock: cocould not bind to address0.0.0.0: 80 ".
No listening sockets available shutting down"
3. check listener. this is an error when listening for port 80. Port 80 may have been occupied by other applications. The failure to start apache is mostly caused by port problems.
4. open the c: \ xampp \ apache \ conf \ directory
5. there is an httpd. cnf file in the directory. open it in Notepad and change "80" to other ports, for example, "8082". save and exit.
6. restart the xampp control panel and start apache. The task is successful and the status is running.
Note: Because the default port of the browser is 80, after you modify the listening port of apache, add the port after localhost when browsing in the browser. For example, http: // localhost: 8082/replaces the original http: // localhost/. of course, localhost = 127.0.0.1, which is the same as http: // 127.0.0.1: 8082.

The above describes the solution to Apache failure in Xampp, including some content. I hope my friends who are interested in PHP tutorials can help me.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.