Can't Access localhost or 127.0.0.1 in wamp - mysql

I was using wamp 2.1a for my wordpress blog and a website. It was working fine. Then I caught a google redirect virus. I tried hard to get rid of it, finally i fixed it. Then, suddenly my wamp server stopped working, I mean both the services were running but when I opened localhost or 127.0.0.1, it just kept loading, and went on forever till I closed the browser's tab. Then I upgraded to wamp 2.2a and the problem is still there.
I've also checked the hosts file, tried to change the port to 8080 for apache, but it didn't help. I do not have skype (and never used it) so there's no port 80 conflict. When I restart the services, the apache service starts but the mysql service doesn't. When I click wamp tray menu, click on the remove service for mysql, a message box appears saying - mysqld.exe has stopped working. The only option I have there is close program.
I can't access my blog so I can't so any testing. Please tell me if this happened to you or if you have a solution to this. Any help is appreciated.

Did you try different web browser? I guess it is browser problem, clear your browser cache, might solve your problem.

I have found the following solution in another post here (from Sergiu Butnarasu) which worked for me.
Modify the apache HTTPD.CONF file. Change "Listen 80" to "Listen 0.0.0.0:80 http://forum.wampserver.com/read.php?2,93143

Related

Adding 127.0.0.1 to hosts file to redirect locally has error. Says my site “refused to connect.”

I answered this below for anyone that is interested
I'm on Windows 10 using Chrome, Firefox and MS Edge. I'm trying to do something for a class I'm taking and can't get it to work. All I want to do is add something like this to the hosts file:
127.0.0.1 mysite.dev
This is ALL to run on my local PC. I eventually need to have my site able to run on IIS, but this is the first step and I can't get past it. (I'm on my second day trying)
What I've done:
I did edits in notepad on a file on my desktop.
I renamed the original hosts file in the drivers/etc directory.
I copied my file into the drivers/etc directory.
I ran ipconfig -flushdns
I successfully pinged the new site with: ping mysite.dev
I cleared browsing history in all three browsers.
I reopened all three browsers.
All that failed to make any difference (and I rebooted as well) So I added this:
I ran ipconfig -flushdns
Then ipconfig -renew
Then ipconfig -registerdns
Then repeated steps 5->6 and all failed to make any difference. These are the errors per browser:
Chrome: This site can’t be reached mysite.dev refused to connect.
Firefox: Unable to connect Firefox can’t establish a connection to the server at www.mysite.dev.
MS Edge: Hmmm...can’t reach this page
I noticed that all three browsers changed http to https. Not sure if that mattered but I followed instructions to disable this re-direct for all three browsers and NONE of them actually stopped the redirect to https.
And I still can't the correct result, which should be the IIS default page. I can see the IIS default page with localhost, so IIS is running.
Help! Any ideas or directions at all would be very appreciated!
Got the answer from someone. Google owns the .dev domains and has restrictions on it so it HAS to be HTTPS, which requires certs etc, which is not in the scope of my class. I just changed it to mysite.local and BOOM!, there it was! Thanks.

Can't log in to an app running on LocalHost - no network activity?

I'm working on an app with a team. They are able to log in fine when running it on their local servers, however when I try to do so I get 'Invalide username / password' and no network activity or console errors in dev tools.
I have no idea why this could be, we're working on the exact same code - clearly it's something on my machine.
Has anyone come across anything like this before?
(Have tried other browsers and still nothing).
Maybe you need to check your server instalation on your machine.
For example, if you are using XAMPP to manage your Apache maybe there is some configuration that was set in the wrong way.
My advice is, save your code and re-install your server, pay attention to all configuration details and see if the problem is solved.

MAMP not connecting to localhost

Just updated MAMP to version 3.2.1 on Yosemite. Both Apache and MySQL servers are green but when I go to my localhost I keep getting: This webpage is not available ERR_NAME_NOT_RESOLVED in browser (Chrome). I’ve tried incognito browsing and Firefox with the same result, tried both the MAMP default port settings and ports 80 & 3306, tried a reinstall of MAMP and rolling back to previous install of MAMP; all without success.
Can anyone suggest how to fix this…it’s starting to drive me crazy!
Possible Thoughts;
In your /Applications/MAMP/htdocs/ folder, is there something in there for your browser to load? Some sort of index.html or index.php file? Could it have gotten removed accidentally?
When you launch MAMP and go to Preferences -> Ports, what is the Apache port? You mentioned you tried the default (8888/8889) and 80/3306, but could the port number somehow have gotten changed?
Is there any chance that some other Apache service is running? This is unlikely as you mentioned that MAMP shows Apache status as green, but it could be worth stopping MAMP, opening Terminal and doing sudo apachectl stop, returning to MAMP and changing the ports to 80/3306, then returning to Terminal and doing sudo apachectl restart. Then return to MAMP and start services again.
If none of the above work, what if you set the Apache port in MAMP's preferences to something random, like 8712, and then try http://localhost:8712/ to see if it loads.
Let us know if you've tried those already!
Had a similar issue. If 127.0.0.1 is working then you just need to point localhost to 127.0.0.1. Edit /etc/hosts file (requires sudo) and include
127.0.0.1 localhost
That resolved it for me.
This still happens occasionally when updating macOS.
Going through all local Wordpress sites and changing the dev url isn't ideal, though necessary when changing the port.
What rather solved the issue for me was restarting Apache as suggested by #ZbadhabitZ, keeping original port number:
sudo apachectl restart
I had this issue because I had Docker Desktop running at the same time; I shut this down and it started working so it must have been a port conflict.

VisualSVN messed up my localhost in Chrome

EDIT:
The localhost seem to be working fine in my firefox, IE and even Chrome's incognito mode. These is a problem specific to chrome. Any ideas?
PREVIOUS:
I just uninstalled VisualSVN Server from my Windows 7. But now when I try to hit localhost, I get redirected to localhost/svn. I am using WAMP and developing something that requires the root access. I can not put the project in a sub directory. I have also tried netstat -ao but no process is using ports 80 or 443.
You may have solved the problem....but for future, those who came here like me looking for a solution to this, this seems to be a prob for browser cache....clearing browser cache history solves the problem.....did for me...
If you uninstalled VisualSVN Server, then it's some other application which runs on 80 / 443 port that redirects you to /svn. Some steps that may help you to determine the root cause:
Verify that VisualSVN Server has been successfully uninstalled.
Start appwiz.cpl and see whether VisualSVN Server is listed as the installed application,
Start services.msc and see whether "VisualSVN Server" service is listed.
Run netstat -anbv and see which app runs on HTTP(S) port.

problems running xamp

I am using a open source document repositary kordil edbms which works fine in my windows 7 machine .
But when i installed it in windows small business server, xamp is not running. when i start task manager httpd itself is not getting shown. I went to xamp control panel and it says error running mysql busy.I have share point in that machine which also has localhost 80.
So I changed the apache port.
I changed the apache port in httpd.conf file in 2 places
listen
server name
It seems i need to change the port for mysql also. Now what is the option to change the port for xamp mysql or am i going wrong some where else. Please also look at the screenshot of xamp control panel.
Quit Skype and then restart all services from your XAMPP and let me know if its work or not.
Port conflict as Skype also consumes 80 by default
Click on SCM and manage services by starting and stopping.
EDIT
check this link for both to work with - http://www.binodranabhat.com.np/blog/using-xampp-and-iis-together/
MYSQL not working because xampp which path excepting that path not getting automatically .
that is reason behind xampp mysql not start
go to window +R press then open cmd with run as administration then type this command
sc delete mysql
then after start mysql problem resolved.
Fixing Apache Port Conflicts
Another error message that is pretty common to see when working with XAMPP is a notification in the XAMPP control panel that the ports Apache needs to use, ports 443 and 80, are already being used by another application.
A message from the XAMPP control panel letting us know Skype is using ports 443 and 80
In the case of the error message in the image above, this is a pretty easy fix. The offending application is Skype. If you see the same message, close Skype completely and restart XAMPP to solve the problem. Skype is a frequent-flier on the port-blocking scene and pretty easy to identify and remediate. Unfortunately, things aren’t always so simple.