php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49183 dns_get_record does not return NAPTR records when you query dot tel domains!
Submitted: 2009-08-06 19:07 UTC Modified: 2009-08-07 13:32 UTC
From: sunnyseh at hotmail dot com Assigned: pajoye
Status: Closed Package: Network related
PHP Version: 5.3.0 OS: windows
Private report: No CVE-ID:
 [2009-08-06 19:07 UTC] sunnyseh at hotmail dot com
Description:
------------
when you use the dns_get_record function it only returns txt records from dot tel domains.  When you use the DNS_NAPTR option it still doesnt return dot tel NAPTR records.  Is this supported functionality or on the roadmap?



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-06 19:27 UTC] pajoye@php.net
Does it return it on unix? Which domain did you use to test?
 [2009-08-07 08:58 UTC] sunnyseh at hotmail dot com
sorry don't have access to a unix env to give it a go.
was on windows - tested with several dot tel domains try henri.tel or ben.tel

view these dot tel domains in a browser and you'll notice all the naptr records, when using the php function you only get back the text records
 [2009-08-07 09:44 UTC] jani@php.net
This short thing returns quite a long list:

# php -r 'var_dump(dns_get_record("ben.tel", DNS_NAPTR));'

Not sure what you actually expected it to return since you didn't mention that. Your bug report is a bit buggy..
 [2009-08-07 10:00 UTC] sunnyseh at hotmail dot com
here you go...

output from:  print_r(dns_get_record('ben.tel', DNS_ALL));

Array ( [0] => Array ( [host] => ben.tel [type] => A [ip] => 194.77.54.2 [class] => IN [ttl] => 86400 ) [1] => Array ( [host] => ben.tel [type] => NS [target] => a0.cth.dns.nic.tel [class] => IN [ttl] => 3600 ) [2] => Array ( [host] => ben.tel [type] => NS [target] => d0.cth.dns.nic.tel [class] => IN [ttl] => 3600 ) [3] => Array ( [host] => ben.tel [type] => NS [target] => n0.cth.dns.nic.tel [class] => IN [ttl] => 3600 ) [4] => Array ( [host] => ben.tel [type] => NS [target] => s0.cth.dns.nic.tel [class] => IN [ttl] => 3600 ) [5] => Array ( [host] => ben.tel [type] => NS [target] => t0.cth.dns.nic.tel [class] => IN [ttl] => 3600 ) [6] => Array ( [host] => ben.tel [type] => TXT [txt] => .tsm1pddx1 [entries] => Array ( [0] => .tsm [1] => 1 [2] => pddx [3] => 1 ) [class] => IN [ttl] => 60 ) [7] => Array ( [host] => ben.tel [type] => TXT [txt] => Welcome to .tel, the new way to communicate! You can't have Laura's telephone number, but more information is available about her and the movie below. ;)) [entries] => Array ( [0] => Welcome to .tel, the new way to communicate! You can't have Laura's telephone number, but more information is available about her and the movie below. ;)) ) [class] => IN [ttl] => 60 ) [8] => Array ( [host] => ben.tel [class] => IN [ttl] => 60 ) [9] => Array ( [host] => ben.tel [class] => IN [ttl] => 60 ) [10] => Array ( [host] => ben.tel [class] => IN [ttl] => 60 ) [11] => Array ( [host] => ben.tel [class] => IN [ttl] => 60 ) ) 

and if you actually browse to ben.tel you'll see the following additional records:
Web (Buy YOUR dottel here) 
telnic.org/business-buy.html Go to 
More About The Movie Web (Learn more) 
www.telnic.org Work Email 
community@telnic.org 

These are all naptr records stored in the dns of ben.tel.  

Let me know if you need further info.

Thanks for looking at this so quickly :)
 [2009-08-07 12:02 UTC] pajoye@php.net
Found the problem and have the fix already, I will commit it when I'm back from holidays on Monday.
 [2009-08-07 13:08 UTC] sunnyseh at hotmail dot com
thanks - your a superstar!

any chance I could get the code before then?  had a project I wanted to work on over the weekend :)
 [2009-08-07 13:31 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=286907
Log: - Fixed #49183, dns_get_record does not return NAPTR records
 [2009-08-07 13:32 UTC] pajoye@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Next windows snapshot will have the fix.
 [2009-08-08 13:01 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=286929
Log: - [DOC] Fixed #49183 patch for VC6, NAPTR is only available in VC9+ build
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 10:03:03 2014 UTC