Symfony:会话没有保存

时间:2017-05-23 16:21:29

标签: php symfony session

我在创建新会话时遇到Symfony 2.8的问题 app_dev.php:

Warning: SessionHandler::read(): open(/storage/h6/846/806846/tmp/sess_agbrtt7qtl6sbasl7hp72hvfug, O_RDWR) failed: No such file or directory (2) in /storage/h6/846/806846/app/cache/dev/classes.php line 420

config.yml

  handler_id: session.handler.native_file
    save_path: "%kernel.root_dir%/sessions"

1 个答案:

答案 0 :(得分:0)

您还需要一个配置行。

   framework:
       session:
           handler_id: session.handler.native_file
           save_path: "%kernel.root_dir%/sessions"