全新安装,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
是不是我本地环境出了问题,原先是好的,因为我更新了下,后来就删除打算重新装的,现在服务器上也一样的问题,重装都解决不了
php7.3.5
composer info | findstr illuminate
能看到 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/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)
这个错误
看不出来什么问题
我换个电脑重装试试吧,谢谢
换个php版本,php7 官方都已经停止维护了
好的,我换个版本试试
同样返回错误
我后来又装了个php版本解决的