Trying to run localhost to test a website in mac osx terminal.
andys-mbp:test Andy$ cd /Users/Andy/Desktop/test
andys-mbp:test Andy$ php -S localhost:8000
This would usually work, but now I'm getting this error message:
Warning: Unknown: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in Unknown on line 0
[Tue Feb 24 12:55:58 2015] Failed to listen on localhost:8000 (reason: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known)
I've followed this tutorial to make sure PHP and apache are running, but it didn't seem to help...
How can I fix this? Any help very much appreciated!
localhost
to127.0.0.1
- Robin Rijkeboerping localhost
and see if it returns a result. If not, you must bind localhost to ip 127.0.0.1 - Benzping: cannot resolve localhost: Unknown host
- Andy W