Discussion Forums  >  Uncategorized

Replies: 3    Views: 161

CoolShaikh
I hate code!
Profile
Posts: 27
Reg: Aug 31, 2011
Edison
270
12/01/11 10:56 AM (14 years ago)

Error adding user or changing email address in BT Server

I keep getting this error when trying to change the default username or add a new user in BT Server Fatal error: Call to undefined function checkdnsrr() in D:Hosting8316294htmlBT-serverincludesutilityFunctions.php on line 1119 I looked at the php file and there isn't any function called checkdnsrr. Any help?
 
CoolShaikh
I hate code!
Profile
Posts: 27
Reg: Aug 31, 2011
Edison
270
like
12/01/11 10:59 AM (14 years ago)
Never mind. That function doesn't exist on a windows server. I'll just remove references to it.
 
CoolShaikh
I hate code!
Profile
Posts: 27
Reg: Aug 31, 2011
Edison
270
like
12/01/11 11:02 AM (14 years ago)
Paste the following function in the BT-serverincludesutilityFunctions.php file if your web server is hosted on Windows. function checkdnsrr($host, $type='MX') { if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { return; } if (empty($host)) { return; } $types=array('A', 'MX', 'NS', 'SOA', 'PTR', 'CNAME', 'AAAA', 'A6', 'SRV', 'NAPTR', 'TXT', 'ANY'); if (!in_array($type,$types)) { user_error(checkdnsrr() Type '$type' not supported, E_USER_WARNING); return; } @exec('nslookup -type='.$type.' '.escapeshellcmd($host), $output); foreach($output as $line){ if (preg_match('/^'.$host.'/',$line)) { return true; } } }
 
RonBrown
Lost but trying
Profile
Posts: 1
Reg: Feb 05, 2014
Wenatchee
10
like
03/05/14 10:30 AM (11 years ago)
Thank you very much for the hint CoolShaikh. I commented out this section because of the same issue, hosted on a Mac server.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.