After WMAP is installed, it cannot run successfully. Then we found that Apache has never been running. Go to the Apache option in WMAP to select start but cannot start. Next, I will summarize several ideas and methods to solve this problem. recently, due to work needs, I want to learn the basic programming of PHP, so I learned how to set up the working environment of PHP.
However, as described in the textbook, after WMAP is installed, it cannot run successfully. Then we found that Apache has never been running. Go to the Apache option in WMAP to select start but cannot start.
After being pointed out by some experts, the following possibility is concluded that Apache cannot be started:
Possible Scenario 1:
The path for installing Apache2 cannot contain Chinese characters.
Case 2:
When Apache is restarted, an error message is displayed, indicating "The requested operation has failed! "Then open the service, start Apache2, and prompt me:
"Windows cannot start Apache2. ..... on the local computer and refer to the specific service error code 1"
Solution: modify the httpd. conf file in the conf \ httpd. conf directory of Apache installation.
# Change this to Listen on specific IP addresses as shown below
# Prevent Apache from glomming onto all bound IP addresses.
#
# Listen 12.34.56.78: 80
Listen 80
Change port 80 to 81 or another one,
After modification,
# Listen 12.34.56.78: 81080
Listen 8080.
Restart ApacheServices.
Maybe, this method may have different solutions for different versions of Apache, I used the apache_2.2.11-win32-x86-no_ssl.msi version in the configuration, I am not very clear about other versions, is it like this change, here, I will share my joy after solving the problem!
Case 3:
Due to the busy hours, PHP is rarely used. but today I suddenly think of several calendar-related PHP programs I wrote at school and want to improve them. so I started Apache from the service but warned me:
"Windows cannot start apache2 on a local computer. For more information, see System event logs. If this is a non-Microsoft service, contact the service provider and refer to service error code 1 ."
I tried it several times and started MYSQL again, but it was able to start. why cannot I start Apache? It seems that httpd was modified last time. conf file. at that time, I only changed "AddCharset GB2312" to "AddDefaultCharset GB2312" because my PHP programs cannot obtain Chinese characters in the URL. so I thought there was a problem here, so I changed it to "AddDefaultCharset GB2312" at that time, so I thought it would not work to verify it next time, so I didn't start Apache, this problem still exists when it is started today. change to the original "AddCharset GB2312" and start again! But it can be started successfully! It seems that this character is incorrect!
Case 4:
When thunder is enabled, Thunder occupies port 80 by default. Close Thunder and restart Apache!