重新安装webman-admin后出现无法登录

kisswugang

问题描述

全新安装,webman框架,然后是admin,装完后台登录报错

报错信息

{code: 500, msg: "Call to undefined method Illuminate\Support\Carbon::now()", type: "failed",…}
code
: 
500
msg
: 
"Call to undefined method Illuminate\\Support\\Carbon::now()"
traces
: 
"Error: Call to undefined method Illuminate\\Support\\Carbon::now() in D:\\wamp\\www\\cbcte\\vendor\\illuminate\\support\\DateFactory.php:221\nStack trace:\n#0 D:\\wamp\\www\\cbcte\\vendor\\illuminate\\support\\Facades\\Facade.php(261): Illuminate\\Support\\DateFactory->__call('now', Array)\n#1 D:\\wamp\\www\\cbcte\\vendor\\illuminate\\database\\Eloquent\\Concerns\\HasTimestamps.php(87): Illuminate\\Support\\Facades\\Facade::__callStatic('now', Array)\n#2 D:\\wamp\\www\\cbcte\\vendor\\illuminate\\database\\Eloquent\\Concerns\\HasTimestamps.php(39): Illuminate\\Database\\Eloquent\\Model->freshTimestamp()\n#3 D:\\wamp\\www\\cbcte\\vendor\\illuminate\\database\\Eloquent\\Model.php(1063): Illuminate\\Database\\Eloquent\\Model->updateTimestamps()\n#4 D:\\wamp\\www\\cbcte\\vendor\\illuminate\\database\\Eloquent\\Model.php(987): Illuminate\\Database\\Eloquent\\Model->performUpdate(Object(Illuminate\\Database\\Eloquent\\Builder))\n#5 D:\\wamp\\www\\cbcte\\plugin\\admin\\app\\controller\\AccountController.php(83): Illuminate\\Database\\Eloquent\\Model->save()\n#6 D:\\wamp\\www\\cbcte\\vendor\\workerman\\webman-framework\\src\\App.php(319): plugin\\admin\\app\\controller\\AccountController->login(Object(support\\Request))\n#7 D:\\wamp\\www\\cbcte\\vendor\\workerman\\webman-framework\\src\\App.php(349): Webman\\App::Webman\\{closure}(Object(support\\Request))\n#8 D:\\wamp\\www\\cbcte\\plugin\\admin\\app\\middleware\\AccessControl.php(47): Webman\\App::Webman\\{closure}(Object(support\\Request))\n#9 D:\\wamp\\www\\cbcte\\vendor\\workerman\\webman-framework\\src\\App.php(341): plugin\\admin\\app\\middleware\\AccessControl->process(Object(support\\Request), Object(Closure))\n#10 D:\\wamp\\www\\cbcte\\vendor\\workerman\\webman-framework\\src\\App.php(141): Webman\\App::Webman\\{closure}(Object(support\\Request))\n#11 D:\\wamp\\www\\cbcte\\vendor\\workerman\\workerman\\Connection\\TcpConnection.php(646): Webman\\App->onMessage(Object(Workerman\\Connection\\TcpConnection), Object(support\\Request))\n#12 D:\\wamp\\www\\cbcte\\vendor\\workerman\\workerman\\Events\\Select.php(311): Workerman\\Connection\\TcpConnection->baseRead(Resource id #338)\n#13 D:\\wamp\\www\\cbcte\\vendor\\workerman\\workerman\\Worker.php(1488): Workerman\\Events\\Select->loop()\n#14 D:\\wamp\\www\\cbcte\\vendor\\workerman\\workerman\\Worker.php(1405): Workerman\\Worker::forkWorkersForWindows()\n#15 D:\\wamp\\www\\cbcte\\vendor\\workerman\\workerman\\Worker.php(560): Workerman\\Worker::forkWorkers()\n#16 D:\\wamp\\www\\cbcte\\vendor\\workerman\\webman-framework\\src\\support\\App.php(131): Workerman\\Worker::runAll()\n#17 D:\\wamp\\www\\cbcte\\start.php(4): support\\App::run()\n#18 {main}"
type
: 
"failed"

操作系统及workerman/webman等框架组件具体版本

windows10,本地测试的,都是按照文档命令一一安装的,命令行php版本是7.3

561 2 0
2个回答

walkor

本地windows php7.3.33测试一切正常

composer info | findstr illuminate

illuminate/bus                   v8.83.27 The Illuminate Bus package.
illuminate/collections           v8.83.27 The Illuminate Collections package.
illuminate/container             v8.83.27 The Illuminate Container package.
illuminate/contracts             v8.83.27 The Illuminate Contracts package.
illuminate/database              v8.83.27 The Illuminate Database package.
illuminate/events                v8.83.27 The Illuminate Events package.
illuminate/macroable             v8.83.27 The Illuminate Macroable package.
illuminate/pagination            v8.83.27 The Illuminate Pagination package.
illuminate/pipeline              v8.83.27 The Illuminate Pipeline package.
illuminate/support               v8.83.27 The Illuminate Support package.
  • kisswugang 2024-06-13

    是不是我本地环境出了问题,原先是好的,因为我更新了下,后来就删除打算重新装的,现在服务器上也一样的问题,重装都解决不了

  • kisswugang 2024-06-13

    php7.3.5

  • walkor 2024-06-13

    composer info | findstr illuminate
    能看到 illuminate 组件的版本,你贴下

  • kisswugang 2024-06-13

    illuminate/bus v8.83.27 The Illuminate Bus package.
    illuminate/collections v8.83.27 The Illuminate Collections package.
    illuminate/container v8.83.27 The Illuminate Container package.
    illuminate/contracts v8.83.27 The Illuminate Contracts package.
    illuminate/database v8.83.27 The Illuminate Database package.
    illuminate/events v8.83.27 The Illuminate Events package.
    illuminate/macroable v8.83.27 The Illuminate Macroable package.
    illuminate/pagination v8.83.27 The Illuminate Pagination package.
    illuminate/pipeline v8.83.27 The Illuminate Pipeline package.
    illuminate/redis v8.83.27 The Illuminate Redis package.
    illuminate/support v8.83.27 The Illuminate Support package.

  • kisswugang 2024-06-13

    有时候多提交几次会返回
    yntax error, unexpected 'fn' (T_STRING), expecting :: (T_PAAMAYIM_NEKUDOTAYIM)
    这个错误

  • walkor 2024-06-13

    看不出来什么问题

  • kisswugang 2024-06-13

    我换个电脑重装试试吧,谢谢

  • walkor 2024-06-13

    换个php版本,php7 官方都已经停止维护了

  • kisswugang 2024-06-13

    好的,我换个版本试试

wesleywu

composer info|grep illuminate
illuminate/container v7.30.6 The Illuminate Container package.
illuminate/contracts v7.30.6 The Illuminate Contracts package.
illuminate/database v7.30.6 The Illuminate Database package.
illuminate/events v7.30.6 The Illuminate Events package.
illuminate/pagination v7.30.6 The Illuminate Pagination package.
illuminate/support v7.30.6 The Illuminate Support package.

php start.php status
Workerman[start.php] status
----------------------------------------------GLOBAL STATUS----------------------------------------------------
Workerman version:4.1.15 PHP version:7.2.6
start time:2024-07-05 22:08:18 run 0 days 0 hours
load average: 0, 0, 0 event-loop:\Workerman\Events\Select

同样返回错误

×
🔝