Question

I am trying to setup Ratchet on my system and have followed socketo.me I have done everything till installing ZMQ and React/Zmq and it was all successful.

But when I try to run push-server.php, the following error occurs:

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'The provided listener was not a valid callable.' in C:\wamp\www\ratchet\vendor\evenement\evenement\src\Evenement\EventEmitter.php on line 21

 InvalidArgumentException: The provided listener was not a valid callable. in C:\wamp\www\ratchet\vendor\evenement\evenement\src\Evenement\EventEmitter.php on line 21

I have already set the PATH variable and enabled the php_zmq extension(I am on Windows using WAMP). I have searched a lot but can't get through this problem, please help.

Was it helpful?

Solution

What have you done ? You have changed the event to be called

$pull->on('message', array($pusher, 'onBlogEntry'));

you have changed the onBlogEntry with a function that you didn't declare in your pusher .. that's it

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top