From: turtle at rawx dot net Operating system: Linux 2.4.24 PHP version: 4.3.5RC2 PHP Bug Type: Network related Bug description: gethostbyname() returns server IP for non-existent hosts
Description: ------------ gethostbyname() is returning my own IP address for non-existent domain names. The expected behavior is that it will return the original name back to you. Resolving a real domain returns it's correct IP address. This issue affects other DNS resoluton commands too... for example, checkdnsrr('totallyfake456jh47r.com','A') returns TRUE. Using local resolution commands, the expected result (NXDOMAIN) is returned: /:~# host totallyfake456jh47r.com Host totallyfake456jh47r.com not found: 3(NXDOMAIN) This may similar (same?) as bug ID <a href='http://bugs.php.net/bug.php?id=21487&edit=2'>21487</a>. PHP configuration: ./configure --with-apxs2=/www/bin/apxs --with-config-file-path=/etc --with-mcrypt --enable-ftp --with-gd=/usr/local --with-zlib-dir=/usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-mysql --with-xml --enable-track-vars Reproduce code: --------------- echo gethostbyname('totallyfake456jh47r.com'); Expected result: ---------------- totallyfake456jh47r.com Actual result: -------------- 66.166.160.74 (my server's own IP) -- Edit bug report at http://bugs.php.net/?id=27163&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27163&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27163&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27163&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27163&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27163&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27163&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27163&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27163&r=support Expected behavior: http://bugs.php.net/fix.php?id=27163&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27163&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27163&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27163&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27163&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27163&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27163&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27163&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27163&r=float