我正在运行Laravel 5.3,当我尝试登录或注册到我的网站时,我做了make:auth命令后出现此错误。我遍布stackoverflow搜索了3个小时,尝试了一切,我仍然得到了这个,真正令人沮丧的是。启用了Mysql扩展,我可以从CLI连接到数据库,所以这是我在这里工作的最后机会!
以下是日志:
in Connector.php line 119
at PDO->__construct('mysql:host=127.0.0.1;port=8000;dbname=freeads', 'root', 'password', array('0', '2', '0', false, false)) in Connector.php line 119
at Connector->createPdoConnection('mysql:host=127.0.0.1;port=8000;dbname=freeads', 'root', 'password', array('0', '2', '0', false, false)) in Connector.php line 56
at Connector->createConnection('mysql:host=127.0.0.1;port=8000;dbname=freeads', array('driver' => 'mysql', 'host' => '127.0.0.1', 'port' => '8000', 'database' => 'freeads', 'username' => 'root', 'password' => 'password', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, 'name' => 'mysql'), array('0', '2', '0', false, false)) in MySqlConnector.php line 24
at MySqlConnector->connect(array('driver' => 'mysql', 'host' => '127.0.0.1', 'port' => '8000', 'database' => 'freeads', 'username' => 'root', 'password' => 'password', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, 'name' => 'mysql')) in compiled.php line 11774
at ConnectionFactory->Illuminate\Database\Connectors\{closure}()
at call_user_func(object(Closure)) in Connection.php line 956
at Connection->getPdo() in Connection.php line 824
at Connection->reconnectIfMissingConnection() in Connection.php line 709
at Connection->run('select * from `users` where `email` = ? limit 1', array('oui@oui.com'), object(Closure)) in Connection.php line 351
at Connection->select('select * from `users` where `email` = ? limit 1', array('oui@oui.com'), true) in Builder.php line 1648
at Builder->runSelect() in Builder.php line 1634
at Builder->get(array('*')) in Builder.php line 613
at Builder->getModels(array('*')) in Builder.php line 318
at Builder->get(array('*')) in Builder.php line 288
at Builder->first() in compiled.php line 1044
at EloquentUserProvider->retrieveByCredentials(array('email' => 'oui@oui.com', 'password' => 'password')) in compiled.php line 615
at SessionGuard->attempt(array('email' => 'oui@oui.com', 'password' => 'password'), false) in compiled.php line 2497
at LoginController->login(object(Request))
at call_user_func_array(array(object(LoginController), 'login'), array(object(Request))) in compiled.php line 9361
at Controller->callAction('login', array(object(Request))) in compiled.php line 9388
at ControllerDispatcher->dispatch(object(Route), object(LoginController), 'login') in compiled.php line 8446
at Route->runController() in compiled.php line 8427
at Route->run(object(Request)) in compiled.php line 8123
at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in RedirectIfAuthenticated.php line 24
at RedirectIfAuthenticated->handle(object(Request), object(Closure)) in compiled.php line 9846
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 9954
at SubstituteBindings->handle(object(Request), object(Closure)) in compiled.php line 9846
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3127
at VerifyCsrfToken->handle(object(Request), object(Closure)) in compiled.php line 9846
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13439
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in compiled.php line 9846
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 11883
at StartSession->handle(object(Request), object(Closure)) in compiled.php line 9846
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13185
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in compiled.php line 9846
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13122
at EncryptCookies->handle(object(Request), object(Closure)) in compiled.php line 9846
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 9831
at Pipeline->then(object(Closure)) in compiled.php line 8124
at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8115
at Router->dispatchToRoute(object(Request)) in compiled.php line 8106
at Router->dispatch(object(Request)) in compiled.php line 2452
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3189
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in compiled.php line 9846
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 9831
at Pipeline->then(object(Closure)) in compiled.php line 2396
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2380
at Kernel->handle(object(Request)) in index.php line 54
at require_once('/var/www/html/freeads/public/index.php') in server.php line 21
答案 0 :(得分:1)
Laravel 5.3需要PHP 5.6.4或更高版本,升级你的php版本