Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP stream_socket_client() Warning

I am building a new WordPress site for a client and all of a sudden today I am seeing this error at the top of the screen. I have never seen this before. Any ideas what could be causing this to happen now? Also how to fix it?

Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/wp-includes/class-http.php on line 787

Warning: stream_socket_client(): unable to connect to tcp://www.MY-DOMAIN.com:80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /var/www/wp-includes/class-http.php on line 787

enter image description here

like image 853
JasonDavis Avatar asked Apr 30 '26 03:04

JasonDavis


1 Answers

Not sure if you are using a VM but when I had this error I resolved it by adding an entry to my hosts file in my vagrant machine that pointed back to localhost.

127.0.0.1 www.MY-DOMAIN.com
like image 129
cbaigorri Avatar answered May 01 '26 18:05

cbaigorri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!