Apache won't start in xampp

来源:互联网 发布:小巨网络靓号真的假的 编辑:程序博客网 时间:2024/04/29 18:29

转网上一个家伙的解决方法: http://www.netshinesoftware.com/blog/apache-wont-start-in-xampp/

If you use XAMPP to run a local web server, you might have come across the problem whereby Apache will not start. You click the Start button in the XAMPP control panel, the green 'Running' message appears for a second or two, then disappears again, and Apache fails to start. This can be a very frustrating problem, as you get absolutely no feedback about why it won't start. I found 2 possible causes for this...

The first, and by the looks of things on Google, most common cause, is that some other application is using port 80 on your PC. A likely culprit is Skype. If you open Skype, and go to Tools->Options... and click on 'Advanced' followed by 'Connection', check whether the 'Use port 80 and 443 as alternatives for incoming connections' option is checked. If so, uncheck it, and make sure the port number in the box at the top is not 80.

If Skype is not using port 80, you might be able to work out what is using that port by opening the Windows command console (in Windows XP, go to Start->Run, type 'cmd' [without quotes] and press enter), and typing:

netstat -a -no

...then press enter. Look for 127.0.0.1:80 or 192.168.1.100:80. If you can see one of those, it is likely that another process is using port 80. Make a note of the value in the PID column (Process ID). Then type the following into the command window:

tasklist

...and press enter. You should then be able to match the PID with the executable file that is using that port. It might be obvious from the file name which application is causing it, or you might have to look it up on google. You could also try ending the task in the windows task manager (do so at your own risk!).

The second cause I found, was that if there is an invalid or conflicting value in your php.ini file, it can cause Apache to bomb out and fail to start. Try replacing your php.ini with the default copy that comes with XAMPP (you can find php.ini that is used by xampp at runtime in the /xampp/apache/bin/ folder. A separate copy of php.ini [as supplied] is available in the /xampp/php/ folder), or undo any changes you may have recently made to php.ini. In my case, I found that trying to load both Zend Optimizer and ionCube caused the problem, so I had to comment out one of them.

If neither of these are the cause of your problem, the first place to start looking would be the Windows Event Log. Then panic.

可惜的是对我都不管用,无赖,采取下下策---重装;关掉杀毒软件重装后Apache可正常工作了。。。这让我想到第一次安装的时候可能是打开了杀毒软件导致一些东东没正确安装。。。


所以增加一个处理方法:

The third cause I found, was shut down your antivirus software and reinstall xampp.

原创粉丝点击