Reputation: 53
I have set the gc_maxlifetime in my config.yml file to 300. But its not working. Symfony2 still takes the value set in php.ini
Symfony version is 2.4.4
Upvotes: 4
Views: 2290
Reputation: 4210
Here is my approach (gotten from Drupal configuration):
native_file
(i'd use PDOSessionHanlder, but seems it's not very stable);seesions
directory under app
folder;config.yml
file:
session:
handler_id: session.handler.native_file
cookie_domain: %cookie_domain%
name: SFSESSID
cookie_lifetime: 2000000 # change this if you want
save_path: "%kernel.root_dir%/sessions"
gc_divisor: 100
gc_maxlifetime: 200000 # change this if you want
gc_probability: 1
Upvotes: 3