NYCPHP Meetup

NYPHP.org

[nycphp-talk] xdebug / socket_accept()

Adrian Noland anoland at indigente.net
Sun Jan 17 11:28:27 EST 2010


Yitzchak,
This isn't really a good way to go about testing the xdebug connection.I
tried it on my machine and got the same errors you did. Depending on the
configuration, the debugger opens port 9000 either during httpd start or the
page runtime. Either way port 9000 is already in use by the time your socket
tries to connect.

Make sure that phpinfo shows the extension is loaded, and that the thread
safety matches all three: httpd, php, and xdebug. If you are using WAMP make
sure the VC versions match as well.
Turn on error logging in httpd, php, and xdebug and make sure they don't
have any problems.

Also, try this to test instead.
<?php
echo 'start';
xdebug_break();
echo 'stop';

?>


On Sat, Jan 16, 2010 at 6:21 PM, Yitzchak Schaffer <
yitzchak.schaffer at gmx.com> wrote:

> 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
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20100117/b4a1630b/attachment.html>


More information about the talk mailing list