When two F3 applications hosted on the same domain are running on the same browser, the session variables are getting erased and hence causing conflicts.
Is there anyway I can create session namespaces in F3? Something like using the session_name()
method in the native PHP sessions?
When two F3 applications hosted on the same domain are running on the same browser, the session variables are getting erased and hence causing conflicts.
Is there anyway I can create session namespaces in F3? Something like using the session_name()
method in the native PHP sessions?
1 Answer
Reset to default 2I'm going to guess for each of your apps you'll need to configure the JAR hive variable.
https://fatfreeframework/3.9/quick-reference#JAR
JAR
Type: array
Default cookie parameters. Consists of the following options:
expire
Unix timestamp, when the cookie should expire. Default:0
path
The path on the server in which the cookie will be available. Default:'/'
domain
The domain that the cookie is available to. Default:$_SERVER['SERVER_NAME']
if available, else''
secure
Set the cookie when a secure HTTPS connection exists. Default:$_SERVER['HTTPS']=='on'
httponly
Make the cookie accessible only through the HTTP protocol. Default:TRUE
You can refer to session_set_cookie_params() in the PHP Manual for more information.
You can also watch a video that goes over using cookies in the Fat-Free Framework.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744695993a4588493.html
$_SESSION
. That is, if F3 uses that. The solution would be to use different (sub)domains for different apps, or to write code in such a way that apps can share their sessions. – KIKO Software Commented Mar 13 at 16:06