ID: 40351 Updated by: [EMAIL PROTECTED] 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:
Does PHP CLI work for you? Previous Comments: ------------------------------------------------------------------------ [2007-02-05 10:05:39] dae at datasec dot no Sorry for not providing enough details the first time, I wanted to be brief, but I was too brief then. I have re-read the instructions, and if I still don't provide enough details, please specify what more details you need from me. Thank you. PHP can not do DNS-resolution, all other software or parts of the OS can. Postfix log-sample: Feb 4 13:18:42 localhost postfix/smtp[8064]: 0EED46BC0D9: to=<[EMAIL PROTECTED]>, relay=mx01.example.com[0.0.0.0], delay=0, status=sent (250 2.0.0 l14CIjgK005386 Message accepted for delivery) Bash example: ~# telnet php.net 80 Trying 69.147.83.197... Connected to php.net. ~# nslookup php.net Server: 213.x.x.x Address: 213.x.x.x#53 Non-authoritative answer: Name: php.net Address: 69.147.83.197 ~# nslookup 69.147.83.197 Server: 213.x.x.x Address: 213.x.x.x#53 Non-authoritative answer: 197.83.147.69.in-addr.arpa name = y2.php.net. Error log example: [date] [error] PHP Warning: socket_connect() Host lookup failed [-10002]: Host name lookup failure PHP compile option: './configure' '--enable-memory-limit' '--enable-safe-mode' '--enable-magic-quotes' '--enable-sockets' '--prefix=/usr/local/php_4.4.4' '--with-openssl' '--enable-force-cgi-redirect' '--with-apache=/root/inst/apache_1.3.37' '--with-zlib' ------------------------------------------------------------------------ [2007-02-05 09:26:29] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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('@', '[EMAIL PROTECTED]'); if(!checkdnsrr($host[1].'.', 'MX') ) { echo "No MX record found for [EMAIL PROTECTED]"; } 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 [EMAIL PROTECTED] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40351&edit=1