allow_url and include()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dakotakeith
Forum Newbie
Posts: 1
Joined: Sat Mar 22, 2008 4:43 pm

allow_url and include()

Post 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
Last edited by Weirdan on Sat Mar 22, 2008 9:03 pm, edited 1 time in total.
Reason: code tags
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: allow_url and include()

Post 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.
Post Reply