Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed apache onto my computer and then went on to install php. I then edited the IniDir and LoadMoadule declarations in the httpd-conf file to indicate the location of the php installation. When I then tried to restart apache I was given the messege:

Windows could not start the Apache2.2 on Local Computer.
 For more information, review the system Event Log.

I have done a number of things to try to fix this but so far I have been unsuccessful.

share|improve this question

closed as not a real question by Sven, MDMarra, Scott Pack, RobM, voretaq7 Jan 20 '12 at 2:41

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Did Apache run before you installed PHP? Try putting your config back to default and restart so as to troubleshoot the changes you have made. Also, have you checked the Event Log? There might be more information there, for example, the actual cause of the error ("port binding issue" for example). – Raul Marengo Jan 17 '12 at 10:03
I restarted Apache before I installed PHP and it worked. I checked the Event Log and it said there was an error with the changes I had made to the httpd-conf file. I went on to delete the changes and start afresh but Apache still fails to restart. – Amy Jan 17 '12 at 10:29
And what do the logs say now? Have you tried restarting your actual machine or checked if there are any processes running using taskmanager? – Raul Marengo Jan 17 '12 at 10:38
the report says: The Apache service named reported the following error: >>> httpd.exe: Syntax error on line 495 of C:/Apache/conf/httpd.conf: Cannot load C:/Apache/php5apache2_2.dll into server: The specified module could not be found. – Amy Jan 17 '12 at 11:00
I have also checked the the port is not being used by any other application – Amy Jan 17 '12 at 11:01

So... what did the event log say ?

Note that IniDir is not an apache directive, and should not occur in httpd.conf.

The LoadModule syntax is documented here.

For you, it will take the form of:

LoadModule php5_module <module_location>/php5apache2_2.dll
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.