Termux-packages: php dns_get_record not working

Created on 8 Aug 2017  路  2Comments  路  Source: termux/termux-packages

Many php projects uses the dns_get_record function to test if user is registering a valid email address.

The following will always return false, but should return dns record as an array

<?php
$server = 'google.com';
print_r(dns_get_record($server));
bug report help wanted

Most helpful comment

PHP needs the dns_search function provided by either libsocket, libresolv, or libbind. The closest I can find in termux-packages is in the dnsutils package which provides bind client commands such as nslookup as well as libbind9. This will require, and still might not work, that the dnsutils package be patched create a symlink from libbind9 to libbind so that PHP's configuration can find it, or the PHP configuration files be patched to look for and link to libbind9 rather than libbind

All 2 comments

I get Warning: dns_get_record(): A temporary server error occurred. in - on line 3

PHP needs the dns_search function provided by either libsocket, libresolv, or libbind. The closest I can find in termux-packages is in the dnsutils package which provides bind client commands such as nslookup as well as libbind9. This will require, and still might not work, that the dnsutils package be patched create a symlink from libbind9 to libbind so that PHP's configuration can find it, or the PHP configuration files be patched to look for and link to libbind9 rather than libbind

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ILadis picture ILadis  路  3Comments

Wetitpig picture Wetitpig  路  3Comments

tigran123 picture tigran123  路  3Comments

thurask picture thurask  路  3Comments

adit picture adit  路  3Comments