问题
I can't make a php server run on my local computer. I tryed with wampserver and Easy PHP. I checked the usage of my port:80
, I changed the port from :80
to :8080
, I gave Apache and mysql the permissions required on the firewall settings... I did everything, but when a type http://localhost
with or without the port number browser answer is always the same:
ERR_CONNECTION_REFUSED
Can you help me, please?
回答1:
While I think this questions is off-topic, I will try to answer it.
I have had problems with Skype and WAMP running at the same time. If you have Skype open, close it and WAMP, then open just WAMP. There is a setting in skype to use an alternate port. It has been covered thousands of times all over the internet.
Close everything you can think of.. Zone Alarm or any other software based firewall, disable Windows firewall, temporarily disable your AV if it has a built in firewall. I am not saying you should run without protection, but you need to identify what is causing the troubles. As far as hardware firewalls, I have a Linksys wireless router (built in firewall) and I have never had to do anything to get WAMP to work behind it.
If you have been messing with tons of settings in your WAMP, then just uninstall it and re-install it. You don't need to change your port to 8080 to get it working, and doing so would require you to always include :8080 in your URL (unless you have it listen on both).
With a stock WAMP, and everything you can think of closed or disabled, try again.
The WAMP icon should be green. Click on it, and go into both Apache and MySQL. They have a "services" sub-menu, where you can start/stop/restart the service. Start should be greyed out, and stop and restart should be available. If you see one of them not started, try clicking "start service". If it still won't start, then click "Install Service". Wait a minute. Then click "Start Service".
For some reason, when I freshly install WAMP, I have to manually install the service on one of them. I don't recall which one. Once I install the service, it then will work. You might have to click the WAMP icon again, and select "Restart All Services". Then go into the Apache and MySQL menus and make sure the services are started.
回答2:
OK after about an hour of trying all of the fixes and youtubes I could find, I read Wade's approach. So with that knowledge I went:
wamp menu->apache->services->start/resume
and boom localhost wamp page popped right up.
This was a fresh install the error for localhost
was 404 err connection refused
.
I hope this helps your frustration.
来源:https://stackoverflow.com/questions/30448399/php-server-err-connection-refused