PDA

View Full Version : Problem with gethostbyname() php4 freebsd



gibass
09-28-2007, 03:50 AM
Hello,
We are using php4 4.4.7 with freebsd and as I see when I run simple script:

<?php
$ip = gethostbyname('example.com');
echo $ip;
?>

from apache it does not resove example.com to an IP address. But when You try to run the same script like php script.php it works perfectly.
Any idea why running script from apache does not resolve domain corectly ?

noescom2
10-07-2007, 12:24 PM
I have the exact same problem on FreeBSD and am eager for a fix. Any leads?

nobaloney
10-08-2007, 03:23 PM
Is this thread helpful?

http://www.directadmin.com/forum/showthread.php?t=21660

Jeff