0

I have a very weird error with symfony. If I create a project with the default project creation command and go into the new folder to start the local webserver I get an error:

Jan 27 17:51:00 |DEBUG| PHP    Reloading PHP versions 
Jan 27 17:51:00 |DEBUG| PHP    Using PHP version 7.4.2 (from default version in $PATH) 
Jan 27 17:51:00 |DEBUG| PHP    unable to find an available port error="lookup localhost on AN_INTERESTING_IP: no such host" path="/usr/bin/php" php="7.4.2"
Jan 27 17:51:00 |INFO | SERVER shut down, bye! 

  lookup localhost on AN_INTERESTING_IP: no such host  

Yesterday I had no problems to start the local webserver. Additionally, the interesting thing is, if I start the local webserver in an other non-symfony-directory the webserver starts without an exception.

Maybe someone has experience with this problem?

Kind regards!

1 Answer 1

3

I had the same problem today and for some reason the file /etc/hosts lacked an entry for localhost. So I added

127.0.0.1 localhost

After that it worked just fine.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, this was the solution! I don't know why this happend...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.