Why the Apache is not starting on XAMPP [closed]

2020-07-25 09:26发布

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?

标签: php apache xampp
4条回答
我命由我不由天
2楼-- · 2020-07-25 09:45

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.

查看更多
别忘想泡老子
3楼-- · 2020-07-25 09:50

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

查看更多
冷血范
4楼-- · 2020-07-25 09:52

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
查看更多
倾城 Initia
5楼-- · 2020-07-25 10:01

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.

查看更多
登录 后发表回答