Skip to content

Commit

Permalink
Add session name to avoid conflicts
Browse files Browse the repository at this point in the history
Avoid potential session name conflicts with other apps on the same host that might use the same default session name.

An example situation to support this need can be found here:
http://www.weberp.org/forum/showthread.php?tid=8133
  • Loading branch information
TurboPT committed Apr 3, 2018
1 parent aca3e1d commit 2bf01bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions includes/session.php
Expand Up @@ -34,8 +34,15 @@
set_time_limit($MaximumExecutionTime);
ini_set('max_execution_time',$MaximumExecutionTime);
}

session_write_close(); //in case a previous session is not closed
ini_set('session.cookie_httponly',1);

// Set a specific session_name to avoid potential default session_name conflicts
// with other apps using the same host.
// For an example situation to support this need, see:
// http://www.weberp.org/forum/showthread.php?tid=8133
session_name('PHPSESSIDwebERPteam');
session_start();

include($PathPrefix . 'includes/ConnectDB.inc');
Expand Down

0 comments on commit 2bf01bf

Please sign in to comment.