Почему админка в Laravel и выдает ошибку 500 Internal Server Error?
Всем доброго времени суток!
Ребят, тут дело такое.. перестало заходить в админку по ссылке site.com/admin после того как я дома ОС переустановил =) выдает ошибку 500. До этого все работало.
В логах по адресу /storage/logs/laravel.log ошибки нет; права выставлял 777 - все впустую; все файлы с бекапом сверял - все в порядке; и перезагружал тоже. Пытался с разных браузеров заходить результат тот же.
Позже додумался зайти поглубже site.com/admin/pages или site.com/admin/all и т.д. по этим ссылкам переходит и все нормально работает, а вот site.com/admin никак не хочет. Чудеса.
До этого раньше бывало, браузер хром в админке ломался и ошибки выдавал. Вроде все.
Все спасибо заработало, В разрешении скорее всего была проблема, и htaccess не работал. Хотя я до этого разрешения не менял)
Скажите пожалуйста, в Laravel на каталоги и на фалы какое лучше выставить?
До этого всегда ставил на каталоги 755, на файлы 644.
Сейчас true молчит, перед тем как в админку я не попал, сервер вставал(бекап по всей видимости делал) я сохранил, хотел по позже разобраться. вот такую портянку выдал..
HttpException in AuthorizesRequests.php line 94: This action is unauthorized.
in AuthorizesRequests.php line 94
at Controller->createGateUnauthorizedException('if-authuser-allows', object(User), 'This action is unauthorized.', object(UnauthorizedException)) in AuthorizesRequests.php line 63
at Controller->authorizeAtGate(object(Gate), 'if-authuser-allows', object(User)) in AuthorizesRequests.php line 24
at Controller->authorize('if-authuser-allows', object(User)) in UsersController.php line 90
at UsersController->deletedposts('tg')
at call_user_func_array(array(object(UsersController), 'deletedposts'), array('userslug' => 'tg')) in Controller.php line 256
at Controller->callAction('deletedposts', array('userslug' => 'tg')) in ControllerDispatcher.php line 164
at ControllerDispatcher->call(object(UsersController), object(Route), 'deletedposts') in ControllerDispatcher.php line 112
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 114
at ControllerDispatcher->callWithinStack(object(UsersController), object(Route), object(Request), 'deletedposts') in ControllerDispatcher.php line 69
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\UsersController', 'deletedposts') in Route.php line 203
at Route->runWithCustomDispatcher(object(Request)) in Route.php line 134
at Route->run(object(Request)) in Router.php line 708
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Router.php line 710
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 675
at Router->dispatchToRoute(object(Request)) in Router.php line 635
at Router->dispatch(object(Request)) in Kernel.php line 236
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in VerifyCsrfToken.php line 50
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in StartSession.php line 62
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 122
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87
at Kernel->handle(object(Request)) in index.php line 54
1/2 UnauthorizedException in HandlesAuthorization.php line 28: This action is unauthorized.
in HandlesAuthorization.php line 28
at Gate->deny() in Gate.php line 224
at Gate->authorize('if-authuser-allows', object(User)) in AuthorizesRequests.php line 59
at Controller->authorizeAtGate(object(Gate), 'if-authuser-allows', object(User)) in AuthorizesRequests.php line 24
at Controller->authorize('if-authuser-allows', object(User)) in UsersController.php line 90
at UsersController->deletedposts('tg')
at call_user_func_array(array(object(UsersController), 'deletedposts'), array('userslug' => 'tg')) in Controller.php line 256
at Controller->callAction('deletedposts', array('userslug' => 'tg')) in ControllerDispatcher.php line 164
at ControllerDispatcher->call(object(UsersController), object(Route), 'deletedposts') in ControllerDispatcher.php line 112
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 114
at ControllerDispatcher->callWithinStack(object(UsersController), object(Route), object(Request), 'deletedposts') in ControllerDispatcher.php line 69
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\UsersController', 'deletedposts') in Route.php line 203
at Route->runWithCustomDispatcher(object(Request)) in Route.php line 134
at Route->run(object(Request)) in Router.php line 708
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Router.php line 710
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 675
at Router->dispatchToRoute(object(Request)) in Router.php line 635
at Router->dispatch(object(Request)) in Kernel.php line 236
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in VerifyCsrfToken.php line 50
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in StartSession.php line 62
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 122
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87
at Kernel->handle(object(Request)) in index.php line 54
Ребят, все же проблема была как мне кажется в htaccess, сейчас еще разок решил установить разрешения 755 на все файлы, но только через ftp и все заработало, до этого менял через терминал.
А вообще какое должно быть разрешение на файлах и на каталогах?
до этого всегда ставил на каталоги 755, на файлы 644.