Thursday, July 24, 2008
Apache vs. Skype
After upgrading my my PHP installation from 4.4.6 on my windows box to 5.2.6, Apache wouldn't start.
I finally determined that it was because Apache was still trying to load the old PHP4 SAPI module, which no longer existed because I renamed the old PHP4 directory.
So after fixing this, Apache should fire right up, correct? Not so fast... I received another error:
(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
Okay, so something else has bound itself to port 80? Why all of the sudden? I didn't have this problem before I upgraded to PHP5, and I know that it's not binding to any ports...
So what's up?
A quick netstat -ao shows me the processes that are bound to each port (the -o option shows the PID). I fired up task manager (make sure that you have the "PID" column checked under "View / Select Columns...") to see who the culprit was ...
... Skype.
So here's the problem (and solution)...
Apparently, my Apache service has been starting up before Skype loads, claiming port 80 (and 443) for itself. When Skype finally loads, it gets a clue and binds to a different port.
But this time, because Apache wasn't able to load (because of my missing PHP4 module), ports 80 and 443 were still available when Skype loaded up. And Skype grabbed them up for itself, which, of course, causes Apache to fail.
Problem is fixed easily by shutting down Skype, re-starting Apache, then re-loading Skype. If Apache loads without problem after a reboot, this shouldn't ever be a problem.
However, if Apache does fail at some point in the future, we don't want our troubleshooting process bogged down with having to figure out the Skype problem again, so let's tell Skype to leave our ports 80 and 443 alone.
Load up Skype, and under Tools -> Options... -> Advanced -> Connection -> uncheck "Use port 80 and 443 as alternatives for incoming connections"
0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home