Answer the question
In order to leave comments, you need to log in
How to attach phpdaemon to Yii2?
Hello! We decided to write a website in yii2 using web sockets. Faced a problem - we can't connect yii2 to web sockets (or vice versa).
In logs: W#23156 crashed by error 'Class 'Yii' not found' at /var/www/app/frontend/phpdaemon/WebSocketApp.php:22
How to solve the problem?
Answer the question
In order to leave comments, you need to log in
they don't need to be linked. The web socket server must be a stand-alone application. You need to organize communication between it and the yii application (via rest, sockets or RabbitMQ/ZeroMQ).
In general, in your case, it seems to me that it is easier to use services like pusher .
php and websocket are incompatible things. Use Erlang, Go, node.js, at worst Python.
Article about "How to connect Yii to phpDaemon" Yii2 is
screwed in almost the same way, you will need to dig a little in the onReady () method.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question