CarbonCopy Posted August 24, 2009 Share Posted August 24, 2009 I recently recompiled php...again....and again (22 times so far), and I've put apache in a chroot jail. Now however, my code that is supposed to take the latest feed from my blog is broken. The error is Warning: simplexml_load_file() [function.simplexml-load-file]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /www/globaltrainingedge.com/pages/test.html on line 5 Warning: simplexml_load_file(http://globaltrainingedge.com/blog/?feed=rss2) [function.simplexml-load-file]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /www/globaltrainingedge.com/pages/test.html on line 5 Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://globaltrainingedge.com/blog/?feed=rss2" in /www/globaltrainingedge.com/pages/test.html on line 5 Notice: Trying to get property of non-object in /www/globaltrainingedge.com/pages/test.html on line 7 Notice: Trying to get property of non-object in /www/globaltrainingedge.com/pages/test.html on line 7 Notice: Trying to get property of non-object in /www/globaltrainingedge.com/pages/test.html on line 7 Notice: Trying to get property of non-object in /www/globaltrainingedge.com/pages/test.html on line 8 Notice: Trying to get property of non-object in /www/globaltrainingedge.com/pages/test.html on line 8 Notice: Trying to get property of non-object in /www/globaltrainingedge.com/pages/test.html on line 8 and the code is <?php $url = "http://globaltrainingedge.com/blog/?feed=rss2"; ini_set("display_errors","on"); error_reporting(E_ALL); $xml = simplexml_load_file($url,NULL); #print_r($xml); $title = $xml->channel->item[0]->title; $content = $xml->channel->item[0]->description; echo "$content"; ?> I've installed webmin and bind and setup a default config. Dig and nslookup both work fine as well. Link to comment https://forums.phpfreaks.com/topic/171692-php_network_getaddresses-getaddrinfo-failed-name-or-service-not-known/ Share on other sites More sharing options...
CarbonCopy Posted August 25, 2009 Author Share Posted August 25, 2009 Come on, someone must know Link to comment https://forums.phpfreaks.com/topic/171692-php_network_getaddresses-getaddrinfo-failed-name-or-service-not-known/#findComment-905439 Share on other sites More sharing options...
modchr00t Posted August 25, 2009 Share Posted August 25, 2009 I recently recompiled php...again....and again (22 times so far), and I've put apache in a chroot jail. Now however, my code that is supposed to take the latest feed from my blog is broken. The error is Warning: simplexml_load_file() [function.simplexml-load-file]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /www/globaltrainingedge.com/pages/test.html on line 5 I've installed webmin and bind and setup a default config. Dig and nslookup both work fine as well. Please: remove bind, as it brings a whole lot of security problems with itself read mod_chroot webpage, which has solutions for both of your recent problems. Link to comment https://forums.phpfreaks.com/topic/171692-php_network_getaddresses-getaddrinfo-failed-name-or-service-not-known/#findComment-906179 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.