Jump to content

Recommended Posts

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.