问题
The other day my Wamp server stopped starting (server will not start). I uninstalled, reinstalled etc. I restored my computer back 4 days to where it ran fine. Then I ran Xampp server and had the exact same problem. To me this indicates a Windows problem. HTTPD.exe
crashes every time it is initiated. I have shut off the firewall and antivirus to no avail.
running netstat -o
in cmd
gives me 127.0.0.1:31595
and higher ports. Port 80 is not in use and is clear.
In Services (wampapache) when I attempt to start the service I get
error 1058, "The service cannot be enabled because it is either diabled or has no enabled devices".
Apache logs gives me
[mpm_winnt:error] [pid 10764:tid 2012] (OS 10022)An invalid argument was supplied. : AH00332: winnt_accept: getsockname error on listening socket, is IPv6 available?
Event Viewer gives me this
Faulting application name: httpd.exe, version: 2.4.3.0, time stamp: 0x502f70a3
Faulting module name: nvLsp.dll, version: 2.2.0.7316, time stamp: 0x4a80a5fd
Exception code: 0xc00000fd
Fault offset: 0x0000c257
Faulting process id: 0x2390
Faulting application start time: 0x01cde46e3fdd7d20
Faulting application path: C:\xampp\apache\bin\httpd.exe Faulting module path: C:\Program Files\NVIDIA Corporation\NetworkAccessManager\bin32\nvLsp.dll
Report Id: 7eee3b80-5061-11e2-886a-00248c1defca
This is Win 7 home premium, Wamp is 64 bit and Xampp is 32 bit. Both worked before. I have read other threads here but they apply mainly to XP.
EDIT One thing I have done if went into Nvidia network controller and disabled the first packet. This got Xampp(partially, server will stay green but still no localhost) to work but not Wamp.
回答1:
For the record, this helped me getting it solved:
- Check if you can start apache as program, not service, but via command prompt!
httpd
orhttpd -e debug
for all possible error & debug messages If it won't start, it will probably tell you the reason (e.g. php or apache configuration error) - If still not OK then install and run it as a service* via command prompt to see if there is anything else wrong.
httpd -k install
andhttpd -k start
Check output at command prompt, error.log and Windows System Event Viewer (Windows Logs/System)
For me this learned me that I had errors in my httpd.conf. After a while I discovered it had something to do with my alias directory, probably permissions. Changing permissions on folder didn't help much (probably bc. I don't know which User the default service uses), but changing service to log on as my user (which is admin) did work.
* Remove this service afterwards if you have xampp or wamp, or you'll have a double entry.
回答2:
A lot of times skype/gtalk desktop version is the reason to make the port 80 busy. This dont appears on the netstat for some reason, but try to quit this kind of programs and start again your server.
回答3:
I had the same issue. Turned out that the Apache service was disabled for some reason.
To fix it, run the command services.msc
and set Apache as enabled.
回答4:
Try "run as administrator". Somewhere in windows7, those settings are corrupted somehow, i guess.
回答5:
i once had this issue on windows 8 for wamp server. But i did get the solution.
- firstly press the windows + R keys on your keyboard
- then type services.msc
- search and locate wampapache
- right click and select properties
- change startup type from manual to automatic
- click apply and ok
- do same for wampmysqld
来源:https://stackoverflow.com/questions/14072923/wamp-xamp-apache-server-not-starting