Apache2.2 service cannot start and other related problem solution Rollup

Source: Internet
Author: User
Tags apache php

A very useful apachehttp://www.apachelounge.com/download/.


Using Xamp,wamp to develop PHP, there is no need to consider configuration issues, but as a realistic developer, or should try it yourself, and then began to download Apache PHP separately, and then configure. But here's the problem: the Apache service can't start--"Apache2.2 services stopped because of 1 (0x1) service errors", so immediately Baidu, coupled with their own pondering, the following is the solution:

1 80 Port issues
Most of the reason comes from the port, and if IIS or other programs on your machine take up 80 ports, Apache will definitely not boot. So the first idea is to solve the port problem--you can use Netstat-an to view port usage, stop using the 80 port program, and then start the service, or let Apache run on another port, such as 8080. Both are available.

2 configuration file httpd.conf issues
A configuration file is the second source of the problem. Typos, incorrect paths, and mismatched version parameters can cause problems. So the second idea is: every change to back up the http.conf file, if you find the problem, then go back to the original configuration file to see if there are problems, if not, it must be the new configuration file has errors. Check
LoadModule php5_module "D:/php-5.2.5-win32/php5apache2_2.dll"
AddType application/x-httpd-php. php
Spelling problems, including spaces. Of course, it is best to copy and paste directly, so the most reliable.
Other errorlog, such as file path slashes, and paths that are not valid, should also be noted.

If the above two steps are safe to pass, then our Apache should be able to start the service!!


There is another type of problem where the service can start but input localhost cannot open the page
This is typically caused by a NetBIOS parsing failure. The solution is simple and the steps are as follows:
1 Right-click on the "Network Places" menu and select "Properties (R)". Out the "Network Connections" window, right-click on "Local Area Connection" and click "Properties (R)" in the menu. Out the Local Area Connection properties panel, found in "This link uses the following items": "Internet Protocol (TCP/IP)", and click on it. On the Internet Protocol (TCP/IP) properties panel that pops up, click the Advanced (V) ... button. Click the WINS tab on the Advanced TCP/IP Settings panel, and remove the tick in front of "Enable LMHOSTS query (L)" and click the "OK" button.
2 Open "Control Panel", click "Windows Firewall", click "Advanced" tab, select "Local Area Connection" and click the "Set (T) ..." button next to it. In the service options, locate "secure Web Server (HTTPS)" And tick it, click the "OK" button.

The last class of questions PHP files cannot be parsed
When you are pleasantly surprised to find that you can open http://localhost and see Apache's "IT works!" Page, you are excited to test a Phpnifo page immediately, but found unable to parse. This is because Apache does not know how to parse php files. Although the LoadModule and AddType statements have told Apache to load the PHP module and note the PHP suffix of the file, but the real parsing is to call Php5ts.dll and so on files, so
Scenario One: Add PHP Directories in path and add them in httpd.conf
Phpinidir "d:/php-5.2.5-win32/"
Scenario Two: Copy the Php5ts.dll directly from the PHP directory to the Apache bin directory

It is also important to note that the version above apache2.2 requires the use of Php5apache2_2.dll
In the php5.2.5 has been brought to use the previous version, such as php5.1 please go to http://php.net download patch Php5apache2.dll-php5.1.x.rar and unzip. Total three files.
Vcredist_x86.exe
Php5apache2.dll
Httpd.exe.manifest
1. Overwrite the Php5apache2.dll file in your original PHP directory with the Php5apache2.dll.
2. Copy the Httpd.exe.manifest file to the Bin folder under your Apache installation directory.
3. Double-click Run Vcredist_x86.exe installation. (If the. NET Framework 2 is already installed on your system, you can dispense with this step)
Get it done! Restart your apache2.2 and try it.
Of course, using php5.2.5 completely without the problem!

Well, probably these problems are more common, I hope to give you a little help!

Original link: http://www.cnitblog.com/benwhite/archive/2008/04/30/43118.html, feel better, summed up quite full, share a bit

Add another workaround that you see on the Web:

Apache service cannot start using Wamp package
Aestan Tray Menu
Could not execute Menu item (interal error)
[Exception] Could not perform service action:
Service not started
  
  
The answer on the web is the local connection---properties----Internet Protocol (TCP/IP)---Properties---advanced---wins----import lmhosts (M)
Add {Apache2dir}\bin\httpd.exe to it and you can start it.


This article is from "Buffy Rain Blog" blog, please be sure to keep this source http://bafeiyu.blog.51cto.com/5401101/1602453

Apache2.2 service cannot start and other related problem solution Rollup

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.