Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.6

Bug #6348 Using = before domain name hangs ?
Submitted: 2005-12-26 23:51 UTC
From: afw at finexe dot com Assigned: kguest
Status: Closed Package: Net_Whois
PHP Version: 4.4.1 OS: windows 2003 server
Roadmaps: (Not assigned)    
Subscription  


 [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

Comments

 [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))) {
 [2008-03-22 21:10 UTC] streety (Jonathan Street)
Added patch for change suggested by afw at finexe dot com I wasn't getting a timeout prior to the patch but the change appears to not throw up any new problems.
 [2008-10-15 11:36 UTC] doconnor (Daniel O'Connor)
Hey Ken, got your PEAR QA hat handy?
 [2008-10-15 12:30 UTC] kguest (Ken Guest)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. added patch and test files. Note: there are phpcs issues and the package.xml needs to be updated to version 2 of the xml spec. These issues are seperate from fixing the bug described here and will be addressed seperately.
 [2016-01-05 21:14 UTC] jpswade (James Wade)