May 022011
 

A quick post here to help folks who get stuck while installing WAMP server on Windows PCs that has SQLServer or IIS installed.

I downloaded WAMP server to test some PHP scripts locally and to my surprise it wouldn’t start! It would just show an orange icon in the Notification Bar and browsing to http://localhost wouldn’t bring up the index.php page.

I was pretty sure I wasn’t running IIS on this machine. I use the Cassini to test ASP.net pages. Running netstat –ano dumped all the network connections that were open on my system.

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4

Interesting. There is something listening on PORT 80 with PID = 4. Let’s examine what it is.

Launched Task Manager, made sure the PID is selected from View –> Select Columns and also clicked on “Show processes from all users”

image

A system process running under system account is listening on port 80! I suspect it is the SQL Server Reporting Services that is causing the problem, but I didn’t bother to verify. Why?

I figured out it would be easier to configure Apache to run on a different port!

Click on Wamp icon is the task bar, under Apache, select httpd.conf to open the Apache Configuration page in Notepad.

You should see text similar to this:

# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

Modify the uncommented line and choose a different port, I chose 8081

Listen 8081

Voila! Restart all services and you should now see a green faced happy WAMP icon in the system tray!