Edit report at http://bugs.php.net/bug.php?id=51958&edit=1
ID: 51958 Updated by: cataphr...@php.net Reported by: grawity at gmail dot com Summary: socket_accept() fails on IPv6 server sockets -Status: Suspended +Status: Closed Type: Bug Package: Sockets related Operating System: Windows XP SP3 PHP Version: 5.3.2 Assigned To: cataphract Block user comment: N Private report: N New Comment: Fix merged to 5.3. Previous Comments: ------------------------------------------------------------------------ [2011-03-15 00:00:01] cataphr...@php.net Fixed in trunk; on hold for 5.3, waiting until after 5.3.6 release. ------------------------------------------------------------------------ [2011-03-14 23:59:07] cataphr...@php.net Automatic comment from SVN on behalf of cataphract Revision: http://svn.php.net/viewvc/?view=revision&revision=309238 Log: - Fixed bug #51958: socket_accept() fails on IPv6 sockets. #On hold for 5.3 ------------------------------------------------------------------------ [2010-05-31 18:04:57] grawity at gmail dot com Description: ------------ When attempting to create an IPv6 server using the socket_*() functions, PHP displays an error when socket_accept() is called: > [10014]: The system detected an invalid pointer address in attempting to use a pointer argument in a call. Client IPv6 sockets (socket_connect()) are working. IPv6 streams, both stream_socket_server() and client(), are working. Other software (such as Python's socket module) is working. Problem occurs even with no php.ini is used: > php -n -d extension="C:\Program Files\PHP\ext\php_sockets.dll" testsock.php Standard PHP build from http://windows.php.net/ is used: > PHP 5.3.2 (cli) (built: Mar 3 2010 20:47:01) > Copyright (c) 1997-2010 The PHP Group > Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies Test script: --------------- <?php $listenfd = socket_create(AF_INET6, SOCK_STREAM, SOL_TCP); socket_bind($listenfd, "::1", 13579); socket_listen($listenfd); print "Waiting...\n"; $connfd = socket_accept($listenfd); if ($connfd) print "Accepted connection.\n"; Expected result: ---------------- Waiting... Accepted connection. (The script should wait for an IPv6 connection on [::1] (IPv6 localhost) port 13579 and print "Accepted connection." when one is accepted) Actual result: -------------- Waiting... Warning: socket_accept(): unable to accept incoming connection [10014]: The system detected an invalid pointer address in attempting to use a pointer argument in a call. in H:\pqi\code\testsock.php on line6 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51958&edit=1