linux centos7 GatewayWorker运行不起来是怎么回事

gaohaichao

运行链接不上  提示 workerman-for-win can not run in linux  

4834 5 0
5个回答

six

你下载的是老的windows版本的GatewayWorker,在linux下无法运行。
现在新版本GatewayWorker已经可以同时支持windows和linux了,从主页下载新版本吧

gaohaichao

我上传了新的结果报错

  • 暂无评论
gaohaichao

还是报错

six

好像是环境问题,百度下应该有答案

  • 暂无评论
phpcreeper

 PHP出于安全因素考虑默认禁用了stream_socket_server等系列相关函数的, 通过 /path/to/php --ini  定位并编辑 /path/to/php.ini , 然后找到  disable_functions = ..... 段,  将 stream_socket_server 函数删除即可。

  • gaohaichao 2019-01-04

    stream_socket_server(): unable to connect to tcp://0.0.0.0:999(Address already in use) in file /www/wwwroot/default/GatewayWorker/vendor/workerman/workerman/Worker.php on line 2178
    PHP Fatal error: Uncaught exception 'Exception' with message 'Address already in use' in /www/wwwroot/default/GatewayWorker/vendor/workerman/workerman/Worker.php:2180
    Stack trace:

    0 /www/wwwroot/default/GatewayWorker/vendor/workerman/workerman/Worker.php(619): Workerman\Worker->listen()

    1 /www/wwwroot/default/GatewayWorker/vendor/workerman/workerman/Worker.php(503): Workerman\Worker::initWorkers()

    2 /www/wwwroot/default/GatewayWorker/start.php(37): Workerman\Worker::runAll()

    3 {main}

    thrown in /www/wwwroot/default/GatewayWorker/vendor/workerman/workerman/Worker.php on line 2180

    Fatal error: Uncaught exception 'Exception' with message 'Address already in use' in /www/wwwroot/default/GatewayWorker/vendor/workerman/workerman/Worker.php:2180
    Stack trace:

    0 /www/wwwroot/default/GatewayWorker/vendor/workerman/workerman/Worker.php(619): Workerman\Worker->listen()

    1 /www/wwwroot/default/GatewayWorker/vendor/workerman/workerman/Worker.php(503): Workerman\Worker::initWorkers()

    2 /www/wwwroot/default/GatewayWorker/start.php(37): Workerman\Worker::runAll()

    3 {main}

    thrown in /www/wwwroot/default/GatewayWorker/vendor/workerman/workerman/Worker.php on line 2180

  • gaohaichao 2019-01-04

    是不是 我的端口没有设置对

  • gaohaichao 2019-01-04

    Press Ctrl+C to stop. Start success.
    client:114.102.189.20:18660 gateway:127.0.0.1:8282 client_id:7f0000010b57000000 01
    exception 'PDOException' with message 'SQLSTATE[42000] [1115] Unknown character set: 'utf'' in /www/wwwroot/default/GatewayWorker/vendor/workerman/gateway-worke r/src/Lib/DbConnection.php:1709
    Stack trace:

    0 /www/wwwroot/default/GatewayWorker/vendor/workerman/gateway-worker/src/Lib/Db Connection.php(1709): PDO->__construct('mysql:dbname=namedata', 'root', '111. .', Array)

  • gaohaichao 2019-01-04

    win 访问正常 ,上传到linux 就不正常了!

年代过于久远,无法发表回答
×
🔝