Database Abstraction Layer for PHP

User Tools

Site Tools



bool ADOdb_Session::config(
  string $driver, 
  optional string $host, 
  optional string $user, 
  optional string $password, 
  optional string $database,
  optional array $options


The static method config defines the parameters required to establish a connection to a database to store session data. The connection established can be either:

  1. A connection to a database already used be ADOdb for read/write operations.
  2. A connection to a different database but in the same rdbms
  3. A connection entirely separate from an existing ADOdb connection

The method should be called before the PHP command session_start. It must be defined in every procedure that accesses session variables.



The ADOdb driver to be used when establishing the connection, or optionally a DSN style configuration string with all of the necessary information required to establish a connection


The host name to use


The user name to use


The password to use


The database to connect to


An optional array of configuration parameters. A list of parameters is defined here.


include_once 'adodb/';
include_once "adodb/session/adodb-session2.php";
$driver = 'mysqli';
$host = '';
$user = 'user';
$pass = 'pass';
$database = 'adodb-sess';
$_SESSION['page'] = 'page1';
v5/session/reference/config.txt · Last modified: 2018/07/01 21:53 by peterdd