#40351 [Opn->Fbk]: DNS resolution fails with PHP
| From: | tony2001@php.net | Date: | Mon, 05 Feb 2007 09:26:30 +0000 |
| Subject: | #40351 [Opn->Fbk]: DNS resolution fails with PHP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-108405@lists.php.net to get a copy of this message | ||
ID: 40351
Updated by: tony2001@php.net
Reported By: dae at datasec dot no
-Status: Open
+Status: Feedback
Bug Type: *Network Functions
Operating System: Trustix 3.0.5 RC1
PHP Version: 4.4.4
New Comment:
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2007-02-04 13:34:33] dae at datasec dot no
Description:
------------
PHP can not do DNS-resolution,
all other software or parts of the OS can.
Reproduce code:
---------------
$foo = gethostbyaddr('69.147.83.197');
echo 'gethostbyaddr [should show a hostname] : '.$foo."\n";
$foo = gethostbyname("php.net");
echo 'gethostbyname [should show an ip] : '.$foo."\n";
$host = explode('@', 'webmaster@php.net');
if(!checkdnsrr($host[1].'.', 'MX') ) {
echo "No MX record found for webmaster@php.net\n";
}
Expected result:
----------------
gethostbyaddr [should show a hostname] : y2.php.net
gethostbyname [should show an ip] : 69.147.83.197
Actual result:
--------------
gethostbyaddr [should show a hostname] : 69.147.83.197
gethostbyname [should show an ip] : php.net
No MX record found for webmaster@php.net
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40351&edit=1