@@ -5,21 +5,21 @@ Configuring the Directory Where Sessions Files are Saved
5
5
========================================================
6
6
7
7
By default, Symfony stores the session data in files in the cache
8
- directory ``%kernel.cach_dir %/sessions ``. This means that when you clear
8
+ directory ``%kernel.cache_dir %/sessions ``. This means that when you clear
9
9
the cache, any current sessions will also be deleted.
10
10
11
11
.. note ::
12
12
13
13
If the ``session `` configuration key is set to ``~ ``, Symfony will use the
14
- global PHP ini values for ``session.save_handler``and associated
14
+ global PHP ini values for ``session.save_handler `` and associated
15
15
``session.save_path `` from ``php.ini ``.
16
16
17
17
.. note ::
18
18
19
19
While the Symfony Full Stack Framework defaults to using the
20
20
``session.handler.native_file ``, the Symfony Standard Edition is
21
21
configured to use PHP's global session settings by default and therefor
22
- sessions will be stored according to the `session.save_path ` location
22
+ sessions will be stored according to the `` session.save_path ` ` location
23
23
and will not be deleted when clearing the cache.
24
24
25
25
Using a different directory to save session data is one method to ensure
@@ -50,10 +50,20 @@ session directory to ``app/sessions``:
50
50
.. code-block :: xml
51
51
52
52
<!-- app/config/config.xml -->
53
- <framework : config >
54
- <framework : session handler-id =" session.handler.native_file" />
55
- <framework : session save-path =" %kernel.root_dir%/sessions" />
56
- </framework : config >
53
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
54
+ <container xmlns =" http://symfony.com/schema/dic/services"
55
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
56
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
57
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
58
+ http://symfony.com/schema/dic/services/services-1.0.xsd
59
+ http://symfony.com/schema/dic/symfony
60
+ http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
61
+ >
62
+ <framework : config >
63
+ <framework : session handler-id =" session.handler.native_file" />
64
+ <framework : session save-path =" %kernel.root_dir%/sessions" />
65
+ </framework : config >
66
+ </container >
57
67
58
68
.. code-block :: php
59
69
0 commit comments