Ticket #599 (closed Patch: fixed)
valid::email_domain error on win32
| Reported by: | Nowaker | Owned by: | Geert |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.2 |
| Component: | Helpers | Version: | SVN HEAD |
| Keywords: | valid email_domain checkdnsrr | Cc: |
Description
Fatal error: Call to undefined function checkdnsrr() in E:\Dev\www\escapi2-shop\html\system\helpers\valid.php on line 58
PHP manual says:
This function is not implemented on Windows platforms.
Solution:
if(!function_exists('checkdnsrr'))
{
function checkdnsrr($host, $type='')
{
if(!empty($host))
{
$type = (empty($type)) ? 'MX' : $type;
exec('nslookup -type='.$type.' '.escapeshellcmd($host), $result);
$it = new ArrayIterator($result);
foreach(new RegexIterator($it, '~^'.$host.'~', RegexIterator::GET_MATCH) as $result)
{
if($result)
{
return true;
}
}
}
return false;
}
}
Change History
Note: See
TracTickets for help on using
tickets.
