I'm trying to run Ratchet tutorial application on my localhost. I followed this tutorial http://socketo.me/docs/push , but on the last step I got this error, after I ran my push server (bin /push_server.php)
Warning: stream_select(): cannot represent a stream of type ZMQ_FD as a select()
able descriptor in C:\wamp\wwwatchet_podla_tutorialu\vendoreact\event-loop\S
treamSelectLoop.php on line 255
Call Stack:
0.0010 236728 1. {main}() C:\wamp\wwwatchet_podla_tutorialu\bin\push
_server.php:0
0.1950 1230808 2. React\EventLoop\StreamSelectLoop->run() C:\wamp\www
atchet_podla_tutorialu\bin\push_server.php:27
0.1950 1231800 3. React\EventLoop\StreamSelectLoop->waitForStreamActivi
ty() C:\wamp\wwwatchet_podla_tutorialu\vendoreact\event-loop\StreamSelectLoo
p.php:201
0.1950 1232352 4. React\EventLoop\StreamSelectLoop->streamSelect() C:\w
amp\wwwatchet_podla_tutorialu\vendoreact\event-loop\StreamSelectLoop.php:221
0.1950 1232496 5. stream_select() C:\wamp\wwwatchet_podla_tutorialu\v
endoreact\event-loop\StreamSelectLoop.php:255
This is my push_server.php file:
<?php
require dirname(__DIR__) . '/vendor/autoload.php';
$loop = React\EventLoop\Factory::create();
$pusher = new MyApp\Pusher;
// Listen for the web server to make a ZeroMQ push after an ajax request
$context = new React\ZMQ\Context($loop);
$pull = $context->getSocket(ZMQ::SOCKET_PULL);
$pull->bind('tcp://127.0.0.1:5555'); // Binding to 127.0.0.1 means the only client that can connect is itself
$pull->on('message', array($pusher, 'onBlogEntry'));
// Set up our WebSocket server for clients wanting real-time updates
$webSock = new React\Socket\Server($loop);
$webSock->listen(8080, '0.0.0.0'); // Binding to 0.0.0.0 means remotes can connect
$webServer = new Ratchet\Server\IoServer(
new Ratchet\Http\HttpServer(
new Ratchet\WebSocket\WsServer(
new Ratchet\Wamp\WampServer(
$pusher
)
)
),
$webSock
);
$loop->run();
I'm running WampServer x 64 on Windows 7 x 64.
I found here an older post, where guy had probably the same problem as me and he fixed it by installing WampServer x32 version. I would like to avoid this solution. Does anybody know how to fix it?