When trying to install the latest version of Apache on my development machine, I was presented with the following error at the end of the installation:

Only one usage of each socket address (protocol/network address/port) is normally pemitted. 
make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to openlogs
Note the errors or messages above, and press the < ESC > key to exit.

Initially I thought it was a problem associated with Windows Vista (yes my development machine is a Vista PC!) and the previously installed IIS. However, after a lot of deliberating and Google searches, it appears that Skype was the culprit. Skype listens on port 80 and 443 for incoming requests. So to solve the problem I simply closed down Skype and re-installed Apache. As Apache was setup as a Windows service, no conflicts subsequently arise with Skype as Apache will start using the ports before Skype.

There is a setting in Skype under Tools > Options > Advanced > Connection called “Use port 80 and 443 as alternatives for incoming connections”. This is checked by default. Uncheck this to prevent conflicts with Apache.

Skype Advanced Connection Options

The Key Point: Stop Skype before installing Apache.

Installing PHP is a relatively simple task one would think. Indeed it is simple, but configuring the php.ini isn’t; at least not so on Windows Vista! It is infuriating when such a relatively simple task is made inordinately complicated because of the nuances of Vista permissions. What started out as a 5 minute task took a significant number of hours searching for a suitable answer on Google, and not only by myself.

The task I was trying to achieve was the installation of development versions of WordPress, Drupal, MediaWiki and Moodle, all of which would require a MySQL database. Trying to load the MySQL extension should have been a simple case of uncommenting the line in the php.ini and restarting the Apache service. With Vista, this was certainly not the case.

I set up a very simple page detailing the php configuration in an index.php file:

< ?php phpinfo(); ?>

This showed me the default configuration path of my php.ini and extensions directory, amongst a whole host of other information.

In both cases the paths were incorrect. First and foremost the configuration file path stated C:\Windows when in fact I had installed it in the root (C:\PHP5). So, although I was amending the php.ini file with the correct detail, Vista was using the default values. If there is no php.ini file in Windows, then you’ll continue banging your head against a brick wall.

The problems didn’t stop there. Moving the php.ini file to the Windows directory under Vista isn’t a simple copy and paste task. You need to be administrator. But Vista’s administrator priviledges are more pseudo than actual! In order to amend and save the php.ini file in the Windows directory, you must run Notepad as administrator and save the file as such. Voila! Everything then works. The phpinfo() function returned the correct installation detail and I could continue with the job I was meant to be doing.

PS. Thanks to Rob Douglas for his help.