Re: gethostbyname failing?

From: Date: Thu, 09 Nov 2006 21:56:47 +0000
Subject: Re: gethostbyname failing?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-244446@lists.php.net to get a copy of this message
Henrik Hudson wrote: > > Hey List- > > running: apache 2.2, freebsd 6.2 and php 4.4.4 > > I've got a wierd issue. I've got a script that does this: > > $domain = "www.google.com"; > $ip = gethostbyname($domain); > echo $ip; > > $hostname = gethostbyaddr("72.14.205.99"); > echo $hostname; > > > Using dig, ping, etc... to confirm name resolution is working works fine. > Running that script from the CLI is fine (ie: php test.php). However, when > running from the web it doesn't work. > > I tried it on a php 5.1.x box and it works fine there. > > Thoughts? > > > Henrik > > <?php echo '<pre>'; print_r( gethostbynamel('www.google.com') ); ?> Array ( [0] => 209.85.135.103 [1] => 209.85.135.104 [2] => 209.85.135.147 [3] => 209.85.135.99 ) Jürgen -- View this message in context: http://www.nabble.com/gethostbyname-failing--tf2604272.html#a7267120 Sent from the PHP - General mailing list archive at Nabble.com.

« previous php.general (#244446) next »