dolibarr  13.0.2
Functions
phpsessionindb.lib.php File Reference

Set function handlers for PHP session management in DB. More...

Go to the source code of this file.

Functions

 dolSessionOpen ($database_name, $table_name)
 The session open handler called by PHP whenever a session is initialized. More...
 
 dolSessionRead ($sess_id)
 This function is called whenever a session_start() call is made and reads the session variables. More...
 
 dolSessionWrite ($sess_id, $val)
 This function is called when a session is initialized with a session_start( ) call, when variables are registered or unregistered, and when session variables are modified. More...
 
 dolSessionClose ($sess_id)
 This function is executed on shutdown of the session. More...
 
 dolSessionDestroy ($sess_id)
 This is called whenever the session_destroy() function call is made. More...
 
 dolSessionGC ($max_lifetime)
 This function is called on a session's start up with the probability specified in session.gc_probability. More...
 

Detailed Description

Set function handlers for PHP session management in DB.

Definition in file phpsessionindb.lib.php.

Function Documentation

dolSessionClose (   $sess_id)

This function is executed on shutdown of the session.

Parameters
string$sess_idSession ID
Returns
boolean Always returns true.

Definition at line 114 of file phpsessionindb.lib.php.

dolSessionDestroy (   $sess_id)

This is called whenever the session_destroy() function call is made.

Returns true if the session has successfully been deleted.

Parameters
string$sess_idSession iDecodeStream
Returns
boolean Always true

Definition at line 129 of file phpsessionindb.lib.php.

dolSessionGC (   $max_lifetime)

This function is called on a session's start up with the probability specified in session.gc_probability.

Performs garbage collection by removing all sessions that haven't been updated in the last $max_lifetime seconds as set in session.gc_maxlifetime.

Parameters
int$max_lifetimeMax lifetime
Returns
boolean true if the DELETE query succeeded.

Definition at line 147 of file phpsessionindb.lib.php.

References $resql, and dol_now().

dolSessionOpen (   $database_name,
  $table_name 
)

The session open handler called by PHP whenever a session is initialized.

Parameters
string$database_nameDatabase NamedConstraint
string$table_nameTable name
Returns
boolean Always true

Definition at line 36 of file phpsessionindb.lib.php.

References getDoliDBInstance().

dolSessionRead (   $sess_id)

This function is called whenever a session_start() call is made and reads the session variables.

Parameters
string$sess_idSession ID
Returns
string Returns "" when a session is not found or (serialized)string if session exists

Definition at line 51 of file phpsessionindb.lib.php.

References $resql.

dolSessionWrite (   $sess_id,
  $val 
)

This function is called when a session is initialized with a session_start( ) call, when variables are registered or unregistered, and when session variables are modified.

Returns true on success.

Parameters
string$sess_idSession iDecodeStream
string$valContent of session
Returns
boolean Always true

Definition at line 79 of file phpsessionindb.lib.php.

References $resql, and dol_now().