[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PHP and fopen remote URL problems
On Feb 22, 2004, at 7:27 PM, Simon H wrote:
> Hi all
>
> I'm not sure if this is the right list for this problem but it is
> specific to my
> OpenBSD box.
>
> In PHP I'm using a (PEAR) class to fetch RSS feeds but it fails on my
> OpenBSD
> 3.4 box.
>
> A simple test is when I run the following script:
>
> <?php
> $fd = fopen( "http://www.php.net/", "r" );
> if (!$fd) {
> echo "Cannot open URL";
> } else {
> while(!feof($fd)) {
> $buffer = fgets($fd, 4096);
> echo $buffer;
> }
> fclose( $fd );
> }
> ?>
>
> It throws the following error in error_log:
>
> [Mon Feb 23 03:06:54 2004] [error] PHP Warning: fopen():
> php_network_getaddresses: getaddrinfo failed: non-recoverable failure
> in name
> resolution in /htdocs/test.php on line 3
Might this be the problem:
http://www.openbsd.org/faq/faq10.html#httpdchroot
Greg