PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_Whois » Bug #6348

Using = before domain name hangs ?

Details

Submitted2005-12-26 23:51 UTC
Fromafw at finexe dot com
Assignedkguest
StatusClosed
PackageNet_Whois
PHP Version4.4.1
OSwindows 2003 server
Roadmaps(Not assigned)

Comments

[2005-12-26 23:51 UTC] afw at finexe dot com

Description:
------------
First I suggest it includes functionality to see if a server responds or not. If a server is not responding, it should try another and not throw fatal php error.

Second, I'm trying to run a whois on:

THIS-DOMAIN-FOR-SALE.COM

which with the current code is querying

com.whois-servers.net

that responds:

THIS-DOMAIN-FOR-SALE.COM.AU
THIS-DOMAIN-FOR-SALE.COM
THIS-DOMAIN-FOR-SALE.COM

To single out one record, look it up with "xxx", where xxx is one of the of the records displayed above. If the records are the same, look them up with "=xxx" to receive a full display for each record.

querying =THIS-DOMAIN-FOR-SALE.COM does not work, the script hangs and throws php error.

If the whois server is queried manually it responds, it doesnt seem to be the whois servers fault. It responds very quickly.

Test script:
---------------
require_once "Net/Whois.php";
$whois = new Net_Whois;
$data = $whois->query("=THIS-DOMAIN-FOR-SALE.COM", "com.whois-servers.net");
echo nl2br($data);

Expected result:
----------------
The correct result is whois server answer.

Also all socket errors should be handled in a nice manner.

Actual result:
--------------
Right now it gives php error:
Fatal error: Maximum execution time of 30 seconds exceeded in C:\PROGRA~1\SWsoft\Plesk\Php\pear\Net\Socket.php on line 287

[2005-12-27 00:33 UTC] afw at finexe dot com

upgraded to net_socket 1.0.6 and the error message is now:
Fatal error: Maximum execution time of 30 seconds exceeded in C:\PROGRA~1\SWsoft\Plesk\Php\pear\Net\Socket.php on line 475

[2006-01-03 00:08 UTC] svenasse at php dot net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PEAR better.

1) I will look into improving the error recovery options.

2) This is the expected result. This name server supports an '=' to refine the search to a specific domain name.

3) Adding the '=' to the domain name returns the expected result and I was unable to get a timeout. I am only able to test this on Windows XP SP1 and SP2, as well as Linux and FreeBSD servers.

[2006-01-03 14:24 UTC] afw at finexe dot com

Hello,

I'm on windows 2k3 (no SP) with precompiled php, and no gdb that I know of. Is there any backtrace instructions for windows?

[2006-06-15 23:34 UTC] afw at finexe dot com

I solved this long ago. There was indeed a bug that made this package very unstable for me.

Here is the change I made, and it has worked well since then:

224c224
< if (PEAR::isError($socket->connect($nicServer, getservbyname('whois', 'tcp')))) {
---
> if (PEAR::isError($socket->connect($nicServer, getservbyname('whois', 'tcp'), false, 25))) {