Home  >  Article  >  Backend Development  >  Session keeps reporting error Session store not set on request

Session keeps reporting error Session store not set on request

PHP中文网
PHP中文网Original
2018-02-18 14:06:334603browse
Route::group(['middleware' => ['web']], function () {
    //
});
仍然报错,看了 session是使用默认file,没问题;文件也是可写的,然后在
Kernel.php中添加了
protected $middleware = [
    \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
    \Illuminate\Session\Middleware\StartSession::class,
    \Illuminate\View\Middleware\ShareErrorsFromSession::class,
];

I suddenly reported the following error without doing anything:

RuntimeException:Session store not set on request.

Solution:

Maybe some of your installation components need to be updated, try it:

[php] view plain copy
composer update

Try running it again.

If you are using a file session, check whether your storage directory has write permissions. Use database to check if there is a sessions table When using memcache/redis, have you started the memcached and redis services, and have you installed the corresponding extensions

The above is the detailed content of Session keeps reporting error Session store not set on request. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn