简体   繁体   中英

fatal error while using dns_get_record in php

I need to get dns records, so i wanted to make use of php's dns_get_record function. By using
this i got a fatal error:

Fatal error: Call to undefined function dns_get_record() in /home/guna/gstats/test.php

I've php 5.2.5 installed and running on RHEL 5. pls check the code below:

$result = dns_get_record("php.net");
print_r($result);  

So what could be the issue? Thanks..

This function is not implemented in Windows (nor FreeBSD AFAIK .

Are you using PHP version < 5? This function is only implemented in 5.0 or greater.

Please check the disable_functions setting in your php.ini file. This behavior may be present if dns_get_record has been disabled.

Alternately, if your PHP installation was custom compiled, you may wish to check the compile-time options to see if dns_get_record was removed. If this is the case, you will probably need to recompile and reinstall PHP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM