Problems with fsockopen and socket address ipv6

Djunity

Verified User
Joined
Mar 9, 2008
Messages
243
Location
Holland
Hi all,

We noticed the following issue, we use fsockopen for example
PHP:
 fsockopen('whois.domain-registry.nl',43, $errno, $errstr, 10);
to query whois servers for domain statuses.
We use ipv4 and ipv6 on the same server and we use the ip link function build in direct admin these days.

The problem we face is that the socket address apperently is one of the ipv6 ip addresses and not an ipv4 ip
so from php seen there is an attempt from an ipv6 server to a non ipv6 ready whois server and will result in a connection time out.

Why is the socket address ipv6 and not ipv4 is this how direct admin ip scripts work ?
Can you change this to the default socket address is ipv4 and not ipv6 ?

Kind regards
 
Back
Top