Why the Apache is not starting on XAMPP

23,606

Solution 1

I deleted each and every file of XAMPP, and reinstalled the new version. Now it is working for me.

Solution 2

Have you messed up with httpd.conf or php.ini?

If not and it happened by itself, you might have to try this: Read Very Carefully

  • Go to c:/xammp/htdocs/ folder, grab everything you need (all sites you need), and backup tn some map on your desktop.
  • Do the same with c:/xammp/mysql/data folder too. Get all databases you need and backup those too in some mysql folder on desktop.
  • SAVE that backup on DVD, CD , or maybe even a external HDD if you have one. Now you have your work saved.

After you did it, shutdown your PC for 20 seconds.

Turn your PC on, and:

  • Uninstall the whole xammp. Erase all of the folders and other files.
  • After you're done, shut down your PC again for 20 seconds.

Turn your PC on, again, and:

  • Download the latest xammp 1.7.1 and install
  • Start xammp IT MUST BE RUNNING!

P.S.: My guess is that some of file may be corrupt. If that isn't going to help, my second guess is that you HDD is on fire.

So you might have to:

  • Go to a store and buy new HDD
  • Install it
  • Set in BIOS command for new disk to be 1st boot
  • Install fresh copy of WinXP
  • Install Xammp
  • When is up and running, go to backup, and move sites (backup) to htdocs folder, and mysql/data to the same one in Xampps.

You will have everything like before.

At the end, use that new HDD for localhost exclusively (if youre doing important things), old HDD for playing around via Internet and stuff.

Solution 3

If you have installed php on your c: drive, change port number 80 to 81 in C:\xampp\apache\conf\httpd.conf

#Listen 0.0.0.0:81
#Listen [::]:81
Listen 81

Solution 4

On Linux (Run this as root):

netstat -taunp | grep LISTEN

Then you can see what process name running on what port.

On Windows: (I used Windows XP and I don't know about compatibitlity)

netstat -ao | find /i "listening"

You can see process ID on rightmost column. Press Ctrl+Alt+Del to show Task Manager, go to Process tab, open menu View > Select Column, show process identifier. Then find matching process name on that tab.

Share:
23,606
Thompson
Author by

Thompson

Updated on July 09, 2022

Comments

  • Thompson
    Thompson almost 2 years

    Until yesterday everything was fine to my localhost, but starting yesterday, localhost is not opening. It's saying "Unable to connect".

    I tried number of times to start the Apache on XAMPP, but it is saying message that busy. The port 80 is busy, I hope.

    I have tried every possible way to free the port 80. For example, Disabled option that "Use port 80" in Skype and Teamviewer. I don't know which program is using the Port 80.

    How can I determine that which program is using the Port 80 and then stop it permanently and use port 80 as my localhost?

  • Thompson
    Thompson about 12 years
    This page says, unable to connect to firefox
  • Rames Palanisamy
    Rames Palanisamy about 12 years
    -1: Your assumption that 127.0.0.1 will respond with a web page is invalid - not everything that could be using port 80 would necessarily respond to an http request. +1 for the linux comand balances it out to naught.
  • Thompson
    Thompson about 12 years
    Haha. Thanks for your help. I did another way. I deleted every file and then reinstalled. Now it works.
  • Gromer
    Gromer over 11 years
    Not sure why you're suggesting to change to port 81 since he made it pretty clear he wanted to find what process was currently running on port 80 so he could kill it and run his application on port 80.
  • Anonymous Penguin
    Anonymous Penguin over 11 years
    @Gromer It is worth a shot. How do you know if Mohan Sinfh wants to use port 80 or just find a fix so it will run?
  • Yubaraj
    Yubaraj over 10 years
    Ha ha.... This is not exact solution.