search

Home  >  Q&A  >  body text

websocket - How to start in phpsocketio?

phpsocketio is based on Workerman
I downloaded the source code from github and modified the logic to run it
If the startup method is
php server.php restart
php server.php start

If you start it like this, you can receive and forward messages
But if I use
php server.php start -d
This will not work. The client will be disconnected as soon as it is connected

I would like to ask what is the difference between starting with start and starting with start -d

I can’t let php server.php start be placed there

漂亮男人漂亮男人2835 days ago956

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-05-16 13:12:10

    Finally the problem was found because Workerman must use its own mysql framework
    If you use other frameworks, the running result will be like a script running from beginning to end, so the database object cannot be persisted

    So you only need to install workerman/mysql

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-16 13:12:10

    start -d is to start the daemon process

    reply
    0
  • Cancelreply