NYCPHP Meetup

[nycphp-talk] xdebug / socket_accept()

Yitzchak Schaffer yitzchak.schaffer at gmx.com
Sat Jan 16 19:21:51 EST 2010


Still working on my xdebug woes; I finished reading the instrux at
http://wiki.netbeans.org/HowToConfigureXDebug
but the test script still fails.  The script:

<?php
$address = '127.0.0.1';
$port = 9000;

$sock = socket_create(AF_INET, SOCK_STREAM, 0);
var_dump($sock);

socket_bind($sock, $address, $port) or die('Unable to bind');
var_dump($sock);

$client = socket_accept($sock);

var_dump($sock);
?>

Each of the three var_dump()'s returns "resource(2, Socket)" but 
socket_accept() errors out with " Warning: socket_accept() 
[function.socket-accept]: unable to accept incoming connection [22]: 
Invalid argument in /www/websites/emeraldview/public/test.php on line 8"

Any ideas?

Many thanks,

-- 
Yitzchak Schaffer
Systems Manager
Touro College Libraries
33 West 23rd Street
New York, NY 10010
Tel (212) 463-0400 x5230
Fax (212) 627-3197
Email yitzchak.schaffer at tourolib.org

Access Problems? Contact systems.library at touro.edu



More information about the talk mailing list