This is a repost.
To summarise: My installtion of PHP is unable to resolve names. I can't use
fopen
to open a URL which uses a name, but if I manually calculate
the IP
address, I can read in the page OK. ( see example below ).
I need some tips on where to start looking to solve this problem.
If it helps, my config options when I built PHP were:
--with-gd=/usr/local/src/gd-1.8.4/
--enable-gd-imgstrttf
--with-ttf=/usr/local/freetype/
--enable-calendar
--disable-short-tags
--with-mysql=/usr/local/mysql/
--with-jpeg-dir=/usr/local/src/jpeg-6b/
--with-apxs=/usr/local/apache/bin/apxs
and I am running PHP 4.0.4pl1 under Debian "Potato" Linux and Apache 1.3
Regs
Brian White
At 16:28 14/08/2001 +1000, Brian White wrote:
>The following code:
>
> $url = "http://www.php.net/";
> print ( implode( "", file( $url ) ));
>
>causes my browser to sit and twiddle it's thumbs for ages and then produce:
>
> Warning: file("http://www.php.net/") - Bad file descriptor in
> myfile.php on line 33
>
> Warning: Bad arguments to implode() in myfile.php on line 33
>
>If, however, I explictly use the IP address:
>
> $url = "http://208.247.106.187/";
> print ( implode( "", file( $url ) ));
>
>it will successfully dump a copy of the php front page.
>
>This says to me that PHP can't resolve names. It is not a problem
>with the linux box it's running on, given that I ran "ping www.php.net"
>on that particular box to find the IP address.
>
>Can anyone tell me what I need to do to make it work?
>
>Regs
>
>Brian White
>-------------------------
>Brian White
>Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
>Phone: +612-93197901
>Web: http://www.steptwo.com.au/
>Email: [EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
-------------------------
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web: http://www.steptwo.com.au/
Email: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]