Skip to content

Commit de774a5

Browse files
author
rotimi
committed
Added 'session_start_options' to ./config/app-settings.php
1 parent 635d0c7 commit de774a5

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

config/app-settings-dist.php

+47
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,55 @@
5959
'log_renderer_class' => \SlimMvcTools\LogErrorRenderer::class,
6060
'xml_renderer_class' => \SlimMvcTools\XmlErrorRenderer::class,
6161

62+
////////////////////////////////////////////////////////////////////////////
63+
// Options for PHP's session_start https://www.php.net/manual/en/function.session-start.php
64+
// See https://www.php.net/session.configuration for more info about these options.
65+
//
66+
// You can pass these options to any part of your code that calls session_start
67+
// \SlimMvcTools\Controllers\BaseController uses these options in all calls to
68+
// session_start within it.
69+
//
70+
// Alternatively, you could configure all these options except read_and_close
71+
// in ./config/ini-settings.php by calling ini_set for each option you want
72+
// to configure.
73+
//
74+
// This setting is optional and you don't need to configure it if you don't
75+
// really need to.
76+
////////////////////////////////////////////////////////////////////////////
77+
'session_start_options' => [
78+
// "cache_expire" => "180",
79+
// "cache_limiter" => "nocache",
80+
// "cookie_domain" => "",
81+
// "cookie_httponly" => "0",
82+
// "cookie_lifetime" => "0",
83+
// "cookie_path" => "/",
84+
// "cookie_samesite" => "",
85+
// "cookie_secure" => "0",
86+
// "gc_divisor" => "100",
87+
// "gc_maxlifetime" => "1440",
88+
// "gc_probability" => "1",
89+
// "lazy_write" => "1",
90+
// "name" => "PHPSESSID",
91+
// "read_and_close" => "0",
92+
// "referer_check" => "",
93+
// "save_handler" => "files",
94+
// "save_path" => "",
95+
// "serialize_handler" => "php",
96+
// "sid_bits_per_character" => "4",
97+
// "sid_length" => "32",
98+
// "trans_sid_hosts" => $_SERVER['HTTP_HOST'],
99+
// "trans_sid_tags" => "a=href,area=href,frame=src,form=",
100+
// "use_cookies" => "1",
101+
// "use_only_cookies" => "1",
102+
// "use_strict_mode" => "0",
103+
// "use_trans_sid" => "0",
104+
],
62105

106+
////////////////////////////////////////////////////////////////////////////
63107
// add other stuff like DB credentials, api keys, etc below
108+
////////////////////////////////////////////////////////////////////////////
109+
110+
64111

65112
////////////////////////////////////////////////////
66113
// End of Your App's Environment Specific Settings

0 commit comments

Comments
 (0)