From:             lucas at facebook dot com
Operating system: fedora fc5
PHP version:      5CVS-2007-06-25 (CVS)
PHP Bug Type:     Feature/Change Request
Bug description:  checkdnsrr does not support DNS_TXT type

Description:
------------
Although you can use dns_get_record to get the contents of the TXT record
you cannot use checkdnsrr or dns_check_record to see if the record exists.
This could be useful for checking against a DNSBL


Reproduce code:
---------------
checkdnsrr('1.1.168.192.my.abusebl.net', "TXT");

Expected result:
----------------
E_WARNING: checkdnsrr(): Type 'TXT' not supported


Actual result:
--------------
1

The following patch enables the TXT_TYPE:

Index: dns.c
===================================================================
RCS file: /repository/php-src/ext/standard/dns.c,v
retrieving revision 1.70.2.7.2.4
diff -u -r1.70.2.7.2.4 dns.c
--- dns.c 14 May 2007 11:33:34 -0000  1.70.2.7.2.4
+++ dns.c 25 Jun 2007 08:52:59 -0000
@@ -290,6 +290,7 @@
      else if (!strcasecmp("ANY",   Z_STRVAL_PP(arg2))) type = DNS_T_ANY;
      else if (!strcasecmp("SOA",   Z_STRVAL_PP(arg2))) type = DNS_T_SOA;
      else if (!strcasecmp("CNAME", Z_STRVAL_PP(arg2))) type =
DNS_T_CNAME;
+     else if (!strcasecmp("TXT",   Z_STRVAL_PP(arg2))) type = DNS_T_TXT;
      else if (!strcasecmp("AAAA",  Z_STRVAL_PP(arg2))) type =
DNS_T_AAAA;
      else if (!strcasecmp("SRV",   Z_STRVAL_PP(arg2))) type = DNS_T_SRV;
      else if (!strcasecmp("NAPTR", Z_STRVAL_PP(arg2))) type =
DNS_T_NAPTR;

-- 
Edit bug report at http://bugs.php.net/?id=41795&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41795&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41795&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41795&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41795&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41795&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41795&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41795&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41795&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41795&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41795&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41795&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41795&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41795&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41795&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41795&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41795&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41795&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41795&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41795&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41795&r=mysqlcfg

Reply via email to