Bug #70199 [Opn->Fbk]: fsockopen fails with IPv6

From: Date: Thu, 06 Aug 2015 04:52:19 +0000
Subject: Bug #70199 [Opn->Fbk]: fsockopen fails with IPv6
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194978@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70199&edit=1 ID: 70199 Updated by: requinix@php.net Reported by: diogo at mgniers dot com Summary: fsockopen fails with IPv6 -Status: Open +Status: Feedback Type: Bug Package: *General Issues Operating System: CentOS 6.6 PHP Version: 5.4.43 Block user comment: N Private report: N New Comment: So you can connect to it, from the same server, to the same server and the same port, all over IPv6, using other applications (like telnet) but not with PHP? Previous Comments: ------------------------------------------------------------------------ [2015-08-06 04:32:06] diogo at mgniers dot com Description: ------------ On a server with support for IPv4 and IPv6, whereas the target domains support both protocols, the fsockopen function only works with IPv4, causing timeout when try to connect via IPv6. Test script: --------------- $con = fsockopen('mx.mydomain.com', 587, $errno, $errstr, 10); if(empty($con)) echo "Not connected: ".$errno." - ".$errstr; else echo "Connected!"; Expected result: ---------------- Connected! Actual result: -------------- Not connected: 110 - Connection timed out ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70199&edit=1

« previous php.bugs (#194978) next »