think-worker icon indicating copy to clipboard operation
think-worker copied to clipboard

tp5.1 启动报错

Open hbh112233abc opened this issue 5 years ago • 0 comments

windows系统启动php think work:server 报错信息如下: [think\exception\ErrorException] Cannot use Workerman\Worker as Worker because the name is already in use 解决办法: 找到目录: \vendor\topthink\think-worker\src\command\Server.php

找到命名空间: use Workerman\Worker; 修改为: use Workerman\Worker as Worker2; 紧接着修改 119 行与 126的 worker 改为 Worker2

找到目录: \vendor\topthink\think-worker\src\command\GatewayWorker.php

找到命名空间 use Workerman\Worker; 修改为: use Workerman\Worker as Worker3;

linux centos系统没有以上错误

hbh112233abc avatar Mar 07 '19 03:03 hbh112233abc