Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apache in xampp won't turn on - after it worked before

I recently installed Xampp on my windows machine. It worked when I just did it, see here. However, now the apache won't turn on. I realize that I did not close it correctly (did not use xampp_stop), so maybe that could be the cause.

The error I am getting is:

    make_sock: could not bind to address 0.0.0.0:80 
    no listening sockets available, shutting down 
    unable to open logs 

How can I get it to work?

like image 905
Lucy Weatherford Avatar asked Feb 03 '12 20:02

Lucy Weatherford


People also ask

Why is Apache not starting with XAMPP?

If XAMPP's Apache cannot start, it is very likely that your default HTTP port (80), is blocked or being used by another application.

Why my Apache server is not running?

There are several reasons your Apache server might fail to run. Something could be blocking the port it uses; there could be another instance of Apache already running; or there might be an incompatibility with the version of PHP you're using in MAMP.

Why did Apache shut down unexpectedly?

However, what may be new to you is the “Apache shutdown unexpectedly” error you're seeing. This message is most commonly caused by a blocked port. Usually, it means that another application installed on your computer, such as Skype, is using the same port as XAMPP.


2 Answers

Just ran into this very well do documented blog with respect to Apache not working.. I think its really good to reference if you have apache startup issues.

apache friends

here are the steps that i note from the link:

  • Check that xampp folder is not in a folder containing spaces or brackets ie (Program Files (x86)
  • Make sure that you have run \xampp\setup_xampp.bat (probably as administrator)
  • in CMD run -netstat -a (or look in Xampp control beta 3 - and press the netstat button... ) , make sure that nothing is running on port 80 ( on win 7 a lot of the time its actually skype that uses port 80) ( quit skype and try again, if so, in skype --> options ->> advanced --> make sure the "use port 80 as alternative checkbox is unchecked"
  • If "system" is using port 80, then its windows that is using it ( i have read that that is some IIS service) - if you enable xampp as a service and re-boot then xampp grabs port 80 before system...
  • If you dont want to run as a service then open xampp\apache\conf\http.conf and change the port that apache will run on (search for string "Listen 80" and "ServerName localhost:80" and change 80 to something else eg: "180")
  • Make sure you are running Xampp control.exe as administrator
  • Stop your firewall temporarily to see if its being stopped (then try startup apache again) if so, create an exception in windows firewall
  • Check that your anti-virus is not stopping it.
  • If you are running windows 7 64 bit ultimate (sp1) (like i am) - then you may still have a problem (like i am)
  • last try is to delete xampp folder, and download a previous version of xampp, then try again.

If you have any other steps that you think may also cause a problem, please comment.

like image 187
Hightower Avatar answered Oct 11 '22 12:10

Hightower


I ended up solving it. Go to the Xampp control panel. Check the "Service" check box. Clicked on "SCM" button. (Or "Service" button, there on the "SCM" button).
Then I clicked on the "Apache" in the list of services. Turned it on.
Now it is labelled as "Running" in the control panel, and "localhost" works.

like image 45
Lucy Weatherford Avatar answered Oct 11 '22 14:10

Lucy Weatherford