This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

To get this done, you will need to override one file, add a database table and modify your config/site.php. Here are jbx's instructions:

Add the following to the top of concrete/startup/session.php

if (SESSION_HANDLER == 'mysql') {
Loader::library('3rdparty/adodb/session/adodb-cryptsession2');
ADOdb_Session::config(SESSION_HANDLER,
                      SESSION_DB_SERVER,
                      SESSION_DB_USERNAME,
                      SESSION_DB_PASSWORD,
                      SESSION_DB_DATABASE,
                      array('table' => SESSION_DB_TABLE)
                     );
 }

Then define the constants in site.php:

define('SESSION_HANDLER', 'mysql');
define('SESSION_DB_SERVER', DB_SERVER);
define('SESSION_DB_USERNAME', DB_USERNAME);
define('SESSION_DB_PASSWORD', DB_PASSWORD);
define('SESSION_DB_DATABASE', DB_DATABASE);
define('SESSION_DB_TABLE', 'PhpSession');

We also need to create the db table:

 CREATE TABLE PhpSession(
  sesskey VARCHAR( 64 ) NOT NULL DEFAULT '',
    expiry DATETIME NOT NULL ,
  expireref VARCHAR( 250 ) DEFAULT '',
  created DATETIME NOT NULL ,
  modified DATETIME NOT NULL ,
  sessdata LONGTEXT,
  PRIMARY KEY ( sesskey ) ,
  INDEX sess2_expiry( expiry ),
  INDEX sess2_expireref( expireref )
 )
Loading Conversation