valvatacea / phpwebsocket

Automatically exported from code.google.com/p/phpwebsocket
0 stars 0 forks source link

socket_select(): 5 is not valid Socket resource #54

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
server.php
$master  = WebSocket("localhost",12345);
client.html
socket = new WebSocket("ws://localhost:12345/websocket/server.php");

php -q server.php
master socket : resource id #4
listening on : localhost port 12345
cmd have notice:
Warning: socket_select(): 5 is not valid Socket resource in 
D:\www\websocket\server.php on line 13
when i visiting http://localhost/websocket/client.html
I use PHP5.2.6
my gmail is online
Please help
thx

Original issue reported on code.google.com by laper...@gmail.com on 27 Jun 2012 at 9:33

GoogleCodeExporter commented 8 years ago
i was open debug
when i visiting http://localhost/websocket/client.html
have this message:
Resource id #5 CONNECTED!

Requesting handshake...
GET /websocket/server.php HTTP/1.1
Upgrade: websocket
Connection: Upgrade
Host: localhost:12345
Origin: http://localhost
Sec-WebSocket-Key: QPwXj2wgSnFKeLfBgOGxAQ==
Sec-WebSocket-Version: 13
Sec-WebSocket-Extensions: x-webkit-deflate-frame
Cookie: PHPSESSID=6a4d9c92860d3681718e752ccd404f03

Handshaking...
failed

Warning: socket_select(): 5 is not a valid Socket resource in D:\websocket\
server.php on line 13

Original comment by laper...@gmail.com on 27 Jun 2012 at 9:55

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
it's ok but socket_recv is garbled

Original comment by laper...@gmail.com on 29 Jun 2012 at 5:40

GoogleCodeExporter commented 8 years ago
I seem to have the exact same problem. Any luck figuring it out?

Original comment by gvanro...@gmail.com on 2 Dec 2012 at 1:33