From:             
Operating system: Ubuntu Server 10.04
PHP version:      5.3.3
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:dns_get_record does not return false on dns server failure

Description:
------------
dns_get_record does not return false on dns server failure



If you make an example dns failure by changing resolv.conf to some silly ip
(i 

used 1.3.3.7)



Requests for existing domain names: OK (array with stuff)

Requests for unexisting domain names: OK (empty array)

Requests for any domain when dns server does not respond: FAIL (empty
array)



Which makes it impossible to see if the dns server failed or if the domain


doesn't exist.



Documentation states: "This function returns an array of associative
arrays, or 

FALSE on failure."



When the DNS server fails, that's considered a failure, correct?

Test script:
---------------
<?php



// try various domains with dns working/not working

print_r(dns_get_record('google.com', DNS_A));



?>



Expected result:
----------------
if dns does not respond within timeout, return false.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=53092&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53092&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53092&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53092&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53092&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53092&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53092&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53092&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53092&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53092&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53092&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53092&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53092&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53092&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53092&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53092&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53092&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53092&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53092&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53092&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53092&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53092&r=mysqlcfg

Reply via email to