2017-05-23 86 views
0

我創建一個新的會話 app_dev.php具有Symfony的2.8有問題:的Symfony:會話不保存

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" 

回答

0

你需要一個更配置一行。

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

in config.yml ?? ?? – omarcss

+0

是的,另一點是handler_id和save_path在config.yml中使用相同的縮進級別。 –