From:             
Operating system: Windows XP SP3
PHP version:      5.3.2
Package:          Sockets related
Bug Type:         Bug
Bug description:socket_accept() fails on IPv6 server sockets

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 bug report at http://bugs.php.net/bug.php?id=51958&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51958&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51958&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=51958&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51958&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51958&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51958&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51958&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51958&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51958&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51958&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51958&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51958&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51958&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51958&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51958&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51958&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51958&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51958&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51958&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51958&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51958&r=mysqlcfg

Reply via email to