Which of the following methods does apache service fail to start?

Source: Internet
Author: User
Tags apache error log fully qualified domain name

This article summarizes the various problems that the apache service cannot start. I hope the following questions can help you.

Unable to start 1

I thought that XAMPPP was installed a few days ago. Was it squeezed out? I immediately ran to the service item to check whether there was anything or not. Try XAMPP to start it. Native APACHE cannot be started, and services do not exist!
Network search information, said port 80 is occupied, immediately netstat-aon | findstr "80", a 1388 occupied 80, but this is Firefox browser... You can't stop using a browser. This is obviously incorrect. Since the service does not exist, the solution should be to install the service.

Immediately install the service.
Go to the BIN directory of APACHE, run HTTPD on the command line interface, run httpd-k install-n "apache", and install the APACHE service. The command line displays the following prompt:
Cocould not reliably determine the server's fully qualified domain name, using 192.168.5.201 for ServerName.
Run httpd. conf, add ServerName localhost: 80, and run apachemonitor.exe again. After reading the previous backup configuration file, this line is commented out. In the past, it was not clear why other integration kits were installed. You must be familiar with APACHE configuration.
---------------------- There is another situation ---------------

Start apache. However, an error is reported during startup and cannot be restarted. View the apache Error Log File and display the Unclean shutdown of previous Apache run?

I searched the internet for two possible errors:

First: [warn] pid file D:/apache2.2/logs/httpd. pid overwritten-Unclean shutdown of previous Apache run?

You need to delete the corresponding apache pid file. But this is not the case for most people.

Case 2: php module addition error. For example, the dll file is not in the php/ext directory as required, for example, the php. ini file is incorrectly written. If no modules are found, delete the newly added modules. The biggest possible reason is that the new extension is not compatible with the corresponding php version, and the extension cannot be found.
Run php.exe to test the function. If the problem is caused by expansion, a window is displayed.


When the apache service cannot be started, the system prompts that the service is stopped after it is started.

System: WindowsXP Professional Service Pack2
Wamp5 Integrated Installation Package
Test port 80: "Your port 80 is not actually used." (even if you change the apache port to 8080, it cannot be started)
The error log is as follows:

Bytes --------------------------------------------------------------------------------------
[Fri Nov 26 10:43:26 2010] [notice] Server built: Jan 18 2008 00:37:19
[Fri Nov 26 10:43:26 2010] [notice] Parent: Created child process 1060
[Fri Nov 26 10:43:26 2010] [notice] Child 1060: Child process is running
[Fri Nov 26 10:43:26 2010] [crit] (OS 10022) provides an invalid parameter. : Child 1060: setup_inherited_listeners (), WSASocket failed to open the inherited socket.
[Fri Nov 26 10:43:27 2010] [crit] Parent: child process exited with status 3 -- Aborting.
[Fri Nov 26 10:44:57 2010] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Fri Nov 26 10:44:57 2010] [notice] Server built: Jan 18 2008 00:37:19
[Fri Nov 26 10:44:57 2010] [notice] Parent: Created child process 6100
[Fri Nov 26 10:44:58 2010] [notice] Child 6100: Child process is running
[Fri Nov 26 10:44:58 2010] [crit] (OS 10022) provides an invalid parameter. : Child 6100: setup_inherited_listeners (), WSASocket failed to open the inherited socket.
[Fri Nov 26 10:44:58 2010] [crit] Parent: child process exited with status 3 -- Aborting.
[Fri Nov 26 10:45:50 2010] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Fri Nov 26 10:45:50 2010] [notice] Server built: Jan 18 2008 00:37:19
[Fri Nov 26 10:45:50 2010] [notice] Parent: Created child process 4180
[Fri Nov 26 10:45:50 2010] [notice] Child 4180: Child process is running
[Fri Nov 26 10:45:50 2010] [crit] (OS 10022) provides an invalid parameter. : Child 4180: setup_inherited_listeners (), WSASocket failed to open the inherited socket.
[Fri Nov 26 10:45:50 2010] [crit] Parent: child process exited with status 3 -- Aborting.
[Fri Nov 26 10:49:46 2010] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming
Bytes ---------------------------------------------------------------------------------------
Uninstall the installation package N times and completely delete it each time. The residual services in the Registry are also deleted and installed N times, apache service cannot be started (this installation package can be installed and used properly in Internet cafes ).

After some online searches and discussion and exploration by our technicians, we finally found a solution:
Local connection --- properties ---- Internet Protocol (TCP/IP) --- properties --- advanced --- wins ---- import LMHOSTS (M) add {apache2dir1_binhttpd.exe to start

For example, if the httpd.exe path is "F: wamp2binapacheapache2.2.8binhttpd.exe", {apache2dir} is "F: wamp2binapacheapache2.2.8"

When you configure the Apache service in Windows

The Apache2 service cannot be started.

Specific service error: 1.

Type net helpmsg 3547 for more help.

. I found that incorrect comments in the configuration file are also one cause of this error: If you write comments in the configuration file httpd. conf, the comments starting with # must be placed in a single line. If you write # comments in the same line of a configuration item, the preceding issue cannot be started. The solution is to separate the comments in one row. This is only one possible reason why it cannot be started.


The service can be started, but the page cannot be opened when you enter localhost.

This is generally caused by netbios parsing failure. The solution is as follows:
1. Right-click "Network Neighbor" and choose "Property (R)" from the menu )". In the "Network Connection" window, right-click "Local Connection" and choose "properties (R)" from the menu )". Go out to the "Local Connection Properties" Panel, find "Internet Protocol (TCP/IP)" in "this link uses the following items", and click it. On the "Internet Protocol (TCP/IP) properties" Panel, click "Advanced (V. "Advanced TCP/IP Settings" click "WINS" option label on the panel, remove the check box before "enable LMHOSTS query (L)", and click "OK.
2. Open "Control Panel", click "Windows Firewall", click the "advanced" option label, select "Local Connection", and click "set (T)" next to it )... "button. Find "Secure Web Server (HTTPS)" in the service options, select it, and click "OK.

The last type of problem cannot be resolved by the PHP file.
When you are pleasantly surprised to find that you can open http: // localhost and see apache's "IT works! "Page, you are very excited to immediately test a phpnifo page, but find that it cannot be parsed. This is because apache does not know how to parse the PHP file. Although the LoadModule and AddType statements have told apache to load the php module and pay attention to the php suffix files, the real parsing still needs to call files such as php5ts. dll, so
Solution 1: add the directory where php is located in path and add it in httpd. conf.
PHPiniDir "D:/php-5.2.5-Win32 /"
Solution 2: directly copy php5ts. dll from the php Directory to the apache bin directory.

Note that apache2.2 and later versions must use php5apache2_2.dll.
Php5.2.5 already comes with the Use of previous versions, such as php5.1 please go to the http://php.net to download Patch php5apache2.dll-php5.1.x.rar and unzip. There are three files.
Vcredist_x86.exe
Php5apache2. dll
Httpd.exe. manifest
1. Overwrite php5apache2. dll to the php5apache2. dll file in your original PHP Directory.
2. Copy the httpd.exe. manifest file to the bin folder under your apache installation directory.
3.install vcredist_x86.exe in double-click mode. (If. NET framework is installed in your system, skip this step)
Done! Restart your apache2.2.
Of course, you can skip this issue when using php5.2.5!

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.