shelluk Posted January 28, 2009 Share Posted January 28, 2009 I hope I've chosen the right forum. If not I apologise. I was wondering if any one could help me come up with a way round this. As I'm struggling to do so. I get the following error: Fatal error: Maximum execution time of 60 seconds exceeded in D:\xampp\php\PEAR\Net\DNS\Resolver.php on line 996 This is a result of the line: $resultC = $resolverC->query($domain,'mx'); From this code: $resolverC = new Net_DNS_Resolver(); // use domains own namservers to look up // $nss is an array of the nameservers for the domain // which we are looping through one at a time $resolverC->nameservers = array($nss[$x]); $resultC = $resolverC->query($domain,'mx'); I know why I get this error but how do I get around it so my page finishes executing gracefully and returns a friendly error? I get it because that nameserver doesn't respond to requests for one reason or another, and times out. Example of what happens with the same request when you do it with nslookup to demonstrate the problem: C:\>nslookup Default Server: dc01.company.local Address: 192.168.1.1 > server ns1.xyzcompany.com Default Server: ns1.xyzcompany.com Address: 194.123.123.123 > xyzcompany.com Server: ns1.xyzcompany.com Address: 194.123.123.123 DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. *** Request to ns1.xyzcompany.com timed-out Thanks for your help, Shell Quote Link to comment https://forums.phpfreaks.com/topic/142784-timeoutfatal-error-issues-with-pear-net-dns/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.