XAMPP configuration problems in Windows

Source: Internet
Author: User
Tags php website

I used to develop PHP with appserv. Later I found that there is a better integrated development tool than appserv-XAMPP: Apache + MySQL + PHP + Perl integration,

XAMPP (Apache + MySQL + PHP + Perl) is a powerful php website development integrated software package. XAMPP can be used to easily build runtime environments for PHP and other programs in various systems.

Download URL: http://www.apachefriends.org/zh_tw/xampp.html

Various platforms are provided online with detailed installation instructions.

 

However, after the instructions are installed, the Apache server cannot be started due to a major problem. It took me a whole day to search for drugs by Google and Baidu.

Finally, PHP and Perl In the XAMPP container conflict with each other.

After checking the results of one day, I will share with you the reason why the Apache server cannot be started to avoid wasting your time on such issues in the future:

 

 

1. Port conflict

In XAMPP, ports 80 and 443 cannot be modified. When XAMPP is started, if port 80/443 is occupied, you can modify the port of this software.

Open XAMPP/Apache/CONF/httpd. the conf file changes 80 to 8081; open the XAMPP/Apache/CONF/extra/httpd-ssl.conf file and change 443 to 4433 or disable the SSL extension (debugging is the case anyway)

 

2. network configuration problems

The solutions are as follows:
Right-click "Network Neighbor" on the desktop and choose "properties"> "network connection"> "Local Connection", right-click "properties", and choose "Local Connection Properties" from the shortcut menu-> under the General tab, "This connection uses the following items (o): "double-click" Internet Protocol (TCP/IP) "-> open the" Internet Protocol (TCP/IP) properties "dialog box-> click" Advanced (v)… "in the lower right corner )..." Button-> open the "Advanced TCP/IP Settings" dialog box-> click the "wins" tab-> select "Disable NetBIOS (s) on TCP/IP )". -> Always click "OK.
Note: The dr. com client we use online conflicts with Apache (I don't know ). If you start Apache with the dr. com client, the preceding error occurs. You must disable the dr. COM Client. Then the Apache server can be started normally.

If you always prompt that the apache service on the local computer is stopped again after it is started, some services will stop automatically if there is nothing they can do, such as "log and alarm" services.

The solution is as follows:
Select
TCP/IP properties-> advanced-> wins tag-> the following options enable LmHosts query and NETBIOS
Change to disabled. The task manager immediately shows that the CPU usage of the Apache process drops rapidly (no more sub-processes are started)

No problem found after testing

Observing

It seems that the problem has nothing to do with the above

It may also be related to the tcpip. SYS file.

Especially for XP SP2 Systems

Except the above two

The extreme way is to disable Apache logs.

How to disable the log file of apache2 )? This is a problem, because writing logs will cause great losses to the system. After logging is disabled, the overall performance can be improved by nearly 40% (roughly estimated). How can this problem be solved?

You can reduce log reading and writing by reducing the log level.

It is worth noting that this will cause troubles for "Intrusion Detection" and other log-based analysis work. Therefore, use it with caution.

Loglevel is used to adjust the details of the information recorded in the error log. (See errorlog command ). You can select the following levels and sort them in descending order of importance:

Level Description Example
Emerg emergency-the system is unavailable. "Child cannot open lock file. exiting"
Alert must take immediate action. "Getpwuid: couldn't determine user name from uid"
Critical Condition of crit. "Socket: failed to get a socket, exiting child"
Error. "Premature end of script headers"
Warn warning. 'Child process 1234 did not exit, sending another sighup"

 

Notice is generally important. "Httpd: Caught sigbus, attempting to dump core in ..."
Info. "Server seems busy, (you may need to increase startservers, or min/maxspareservers )..."
Debug error level information "Opening config file ..."

We recommend that you set crit to warn.

 

(3)
Although the above method solves the problem of Apache, it may occasionally fail to access the network. After several days of data search, I finally found a perfect solution. The solution is as follows:
Network neighbors->; view Network Connections-> local connections (the connection you are using, usually the name)->; right-click it and select "attribute"->; select "Internet Protocol (TCP/IP)
->; Properties->; advanced->; switch to the WINS tab-> click "Import LmHosts (m) "then select the bin folder under the Apache directory you installed (the directory I installed is D: // appserv // apache2.2 // bin). After importing httpd.exe, you can enable Apache or access the internet.

 

3.
When the system is upgraded to WINXP [SP2], Apache may fail to start properly:
The error. log is described as follows:

[Crit] (OS 10022) provides an invalid parameter.
Solution:
1. Select "Network Neighbor"> "Local Connection"> "properties"> "Internet Protocol" (TCP/IP)> "properties"> "advanced"> "wins tag"> remove the check box before enabling the LmHosts query.

2. Select "Control Panel"> "Windows Firewall"> "Advanced tab"> "local connection settings"> "service", and select "Secure Web Server (https.

(The preceding two items are still faulty. Select: Enable netbois on TCI/IP.

This is an online solution. After I try it, I will continue to find the problem. You can perform the following operations.

3. Enter netsh Winsock reset in the run.

Cause: Some people found the question winsockafter searching with hijackthis.exe:

So I found winsockxpfix.exe and tried to fix Winsock,
After restart? Apache can be started.

Later, I found that the host can be recovered without restarting. I just need to fix the network connection.

In fact, Windows has a repair tool.

As long as you enter:

Netsh Winsock Reset

Don't even need a reboot prompt. It's very good and powerful!

 

4. XAMPP container internal conflict

 

Open the XAMPP control panel, click setup, and select disable mod_perl to solve the conflict. After Google for a long time, this method was still found on an English website, which solved my problem.

 

 

 

 

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.