Page 1 of 1

allow_url and include()

Posted: Sat Mar 22, 2008 5:05 pm
by Dakotakeith
I am having a problem getting an include_once to work in development using localhost in apache. I am using the include_once function to pull in html from a third party site (that I pay for).

My php.ini file is set as follows.

Code: Select all

 
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On
 
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = On
 
The error message I get is as follows.

Code: Select all

 
Warning: include_once() [function.include-once]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\Documents and Settings\Admin\My Documents\webpages\a2i\webpages\beta\index.php on line 65
 
Warning: include_once(http://www.feedsyndicate.com/feed?a=XXX ... cc=k&cs=10) [function.include-once]: failed to open stream: No error in C:\Documents and Settings\Admin\My Documents\webpages\a2i\webpages\beta\index.php on line 65
 
Warning: include_once() [function.include]: Failed opening 'http://www.feedsyndicate.com/feed?a=XXXXXXXX&t=headlines&f=php&c=Geology&r=5&d=h&db=w&hl=1&ff=t&fc=b&fs=12&hh=1&hb=1&cc=k&cs=10' for inclusion (include_path='.;c:\php\includes;http://') in C:\Documents and Settings\Admin\My Documents\webpages\a2i\webpages\beta\index.php on line 65
 
I have tried to look at path info, cgi setting and can't find a solution. Is there something else that needs to be set in php.ini or on apache?

Thanks

Re: allow_url and include()

Posted: Sat Mar 22, 2008 9:05 pm
by Weirdan
php_network_getaddresses: getaddrinfo failed: No such host is known.
This says it all: your server is unable to resolve requested domain name.