全新安裝,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"
windows10,本地測試的,都是按照文檔命令一一安裝的,命令行php版本是7.3
本地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.
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.
有時候多提交幾次會返回
yntax error, unexpected 'fn' (T_STRING), expecting :: (T_PAAMAYIM_NEKUDOTAYIM)
這個錯誤
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
同樣返回錯誤