Installing Apache 2.2 on Windows 7

After installing Apache 2.2 using the installer on Windows 7 64-bit, it did not work. I got the following error messages during the last part of the install:

First window of errors:

Installing the Apache2.2 service
The Apache2.2 service is successfully installed.
Testing httpd.conf….
Errors reported here must be corrected before the service can be started.
httpd.exe: Could not reliably determine the server’s fully qualified domain name
, using 10.56.78.2 for ServerName
(OS 10048)Only one usage of each socket address (protocol/network address/port)
is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Note the errors or messages above, and press the key to exit. 15…

Second window of errors:

httpd.exe: Could not reliably determine the server’s fully qualified domain name
, using 10.56.78.2 for ServerName
(OS 10048)Only one usage of each socket address (protocol/network address/port)
is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Note the errors or messages above, and press the key to exit. 25…

I found nothing in the logs, but I restarted, and then it all just worked. Oldest trick in the book!

My next challenge was to get it working with PHP. The PHP install could not update httpd.conf, so I was going to have to do it manually. Then, I found that I could not edit the httpd.conf either, due to UAC. I had to run my text editor as Administrator to get it to work. To avoid this problem in the future, I set the program to always run as Administrator (is this a good idea? not sure).

OK, httpd.conf updated, now apache won’t start. The errors were not being written to the apache logs, but I found them in the Event Viewer. It was complaining about a port in use. Through some research, I found that skype uses port 80. I disabled the setting in skype by going to Tools…Options…Advanced…Connection, and unchecking “Use port 80 and 443 as alternatives for incoming connections”. I don’t use skype much–not a problem.

I restarted skype, but apache was still failing to start. This time, the apache error log had the clue. The message was

[crit] (OS 1813)The specified resource type cannot be found in the image file. : master_main: create child process failed. Exiting.

A google search led me to run php from the command line, which gave me two error messages. One implicated ntwdblib.dll and the other php_mssql.dll. Both are related to MSSQL, which I do not use. I disabled this extension in php.ini, and it works at last!

About these ads

Tags: , , ,

2 Responses to “Installing Apache 2.2 on Windows 7”

  1. Flow Meter Says:

    well, i have troubles installing windows7 on my PC. maybe i need a bios update or something ~;`

    • mcrusch Says:

      Yeah, can’t help you there, I haven’t had the courage or motivation to upgrade an OS since WFW3.11->Win95.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: