我尝试登录时收到消息。昨天一切都很好。我检查了与数据库的连接,并检查了mysql服务器是否正常工作。
FatalThrowableError in PDOConnection.php line 24:
Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)
in PDOConnection.php line 24
at Composer\Autoload\includeFile('/var/www/html/vendor/composer/../doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php') in ClassLoader.php line 322
at ClassLoader->loadClass('Doctrine\DBAL\Driver\PDOConnection')
at spl_autoload_call('Doctrine\DBAL\Driver\PDOConnection')
at class_exists('Doctrine\DBAL\Driver\PDOConnection') in Connector.php line 115
at Connector->createPdoConnection('mysql:host=127.0.0.1;port=3306;dbname=fuckerbot', 'root', '****', array('0', '2', '0', false, false)) in Connector.php line 56
at Connector->createConnection('mysql:host=127.0.0.1;port=3306;dbname=fuckerbot', array('driver' => 'mysql', 'host' => '127.0.0.1', 'port' => '3306', 'database' => 'fuckerbot', 'username' => 'root', 'password' => '*****', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => false, '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' => '3306', 'database' => 'fuckerbot', 'username' => 'root', 'password' => '*****', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => false, 'engine' => null, 'name' => 'mysql')) in ConnectionFactory.php line 126
at ConnectionFactory->Illuminate\Database\Connectors\{closure}()
at call_user_func(object(Closure)) in Connection.php line 965
at Connection->getPdo() in Connection.php line 986
at Connection->getReadPdo() in Connection.php line 423
at Connection->getPdoForSelect(true) in Connection.php line 333
at Connection->Illuminate\Database\{closure}(object(MySqlConnection), 'select * from `users` where `email` = ? limit 1', array('admin@admin.ru')) in Connection.php line 763
at Connection->runQueryCallback('select * from `users` where `email` = ? limit 1', array('admin@admin.ru'), object(Closure)) in Connection.php line 726
at Connection->run('select * from `users` where `email` = ? limit 1', array('admin@admin.ru'), object(Closure)) in Connection.php line 351
at Connection->select('select * from `users` where `email` = ? limit 1', array('admin@admin.ru'), true) in Builder.php line 1648
at Builder->runSelect() in Builder.php line 1634
at Builder->get(array('*')) in Builder.php line 638
at Builder->getModels(array('*')) in Builder.php line 327
at Builder->get(array('*')) in Builder.php line 297
at Builder->first() in EloquentUserProvider.php line 104
at EloquentUserProvider->retrieveByCredentials(array('email' => 'admin@admin.ru', 'password' => '*****')) in SessionGuard.php line 353
at SessionGuard->attempt(array('email' => 'admin@admin.ru', 'password' => '*******'), false) in AuthenticatesUsers.php line 76
at LoginController->attemptLogin(object(Request)) in AuthenticatesUsers.php line 42
at LoginController->login(object(Request))
at call_user_func_array(array(object(LoginController), 'login'), array(object(Request))) in Controller.php line 55
at Controller->callAction('login', array(object(Request))) in ControllerDispatcher.php line 44
at ControllerDispatcher->dispatch(object(Route), object(LoginController), 'login') in Route.php line 189
at Route->runController() in Route.php line 144
at Route->run(object(Request)) in Router.php line 653
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 Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 65
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Router.php line 655
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 629
at Router->dispatchToRoute(object(Request)) in Router.php line 607
at Router->dispatch(object(Request)) in Kernel.php line 268
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Kernel.php line 150
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 117
at Kernel->handle(object(Request)) in index.php line 53
这都是错误消息中的堆栈跟踪。我没有从我的代码中找到和点。在本地系统上,它的项目可以正常工作。但是远程服务器有这个错误。
2条答案
按热度按时间8nuwlpux1#
此行发生错误:
特别是在问号上
?
之前array $options
.这是phpv7.1中引入的一个新特性,称为nullable类型。
您必须使用7.1或更高版本才能消除此错误。
vlurs2pr2#
实际上,Laravel5.3需要一个5.6.4到7.1之间的php版本。*您已经更改了它,也许您没有激活这里列出的正确扩展https://laravel.com/docs/5.3/installation 安装PHP7.0后没有?