user2296604
user2296604

Reputation: 75

Localhost giving an error "ERR_NAME_NOT_RESOLVED "

I am trying to run a few php files using my localhost . I have wamp installed and its running fine. I created a folder in the "www" directory and the folder is visible when I run the localhost. Now I have a few .php files that I would like to run but I am unable to access them as I am receiving this error "ERR_NAME_NOT_RESOLVED "

I researched on line and made changes to my index.php file. I changed the $suppress_localhost = true; to $suppress_localhost = false; but I am still receiving the same error.

Any help would be appreciated.

Upvotes: 5

Views: 17346

Answers (2)

Mottasin Leemon
Mottasin Leemon

Reputation: 11

I found this helpful for my issue. Browser cached the dns somehow. All I need to do just flush the dns caching.

For windows:

ipconfig /flushdns

See Docs.

Upvotes: 1

marvinfrede
marvinfrede

Reputation: 1298

For all those who, like me, also end up here: I had this error due to a mistake in thinking.

  • I hosted my Laravel backend locally via xampp.
  • but then tried to access it via an app on my smartphone. In the app I then specified blabla.test (http://localhost/htdocs-path/to/project/public/) as the servers url. But of course I needed the IP address of my PC. So http://192.168.2.173/htdocs-path/to/project/public/ was the correct local server url.

Upvotes: 1

Related Questions