You are not logged in.

#1 2014-05-13 08:19:23

Ree
Member
Registered: 2010-05-19
Posts: 37

No DNS?

I'm using PHP with Apache but for some reason PHP cannot resolve domain names:

file_get_contents('http://google.com')
file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known

The same works fine from CLI.

What could be the problem?

My system is up to date.

Last edited by Ree (2014-05-13 08:19:37)

Offline

#2 2014-05-13 22:07:03

psycho_tea_drinker
Member
From: West Sussex, United Kingdom
Registered: 2013-07-02
Posts: 41

Re: No DNS?

I'm having the same problem. Did you manage to fix this yet by any chance?

Offline

#3 2014-08-22 05:58:39

Creak
Member
Registered: 2013-10-23
Posts: 89

Re: No DNS?

Same here, do you have a solution for that?
I'm pretty sure I just have to install a package or change something in the php.ini, but I don't know what...

Offline

#4 2014-08-22 13:49:53

Creak
Member
Registered: 2013-10-23
Posts: 89

Re: No DNS?

Found it!

You need to enable the extension socket.so in php.ini.

Offline

Board footer

Powered by FluxBB