LiveUser
[ class tree: LiveUser ] [ index: LiveUser ] [ all elements ]

Source for file conf_pdo.php

Documentation is available at conf_pdo.php

  1. <?php
  2. require_once 'MDB2.php';
  3. require_once 'LiveUser.php';
  4. // Please configure the following file according to your environment
  5.  
  6. $dsn 'mysql:host=localhost;dbname=liveuser_test_example5';
  7.  
  8. $dsn_2 'mysqli://root:@localhost/liveuser_test_example5';
  9.  
  10. $db = MDB2::connect($dsn_2);
  11.  
  12. if (PEAR::isError($db)) {
  13.     echo $db->getMessage(' ' $db->getUserInfo();
  14. }
  15.  
  16. $db->setFetchMode(MDB2_FETCHMODE_ASSOC);
  17.  
  18. $conf =
  19.     array(
  20.         'debug' => true,
  21.         'session'  => array(
  22.             'name'     => 'PHPSESSION',
  23.             'varname'  => 'ludata'
  24.         ),
  25.         'login' => array(
  26.             'force'    => false,
  27.         ),
  28.         'logout' => array(
  29.             'destroy'  => true,
  30.         ),
  31.         'authContainers' => array(
  32.             'DB' => array(
  33.                 'type'          => 'PDO',
  34.                 'expireTime'    => 3600,
  35.                 'idleTime'      => 1800,
  36.                 'storage' => array(
  37.                     'dsn' => $dsn,
  38.                     'prefix' => 'liveuser_',
  39.                     'options' => array(
  40.                         'username'   => 'root',
  41.                         'password' => ''
  42.                     ),
  43.                     'alias' => array(
  44.                         'lastlogin' => 'lastlogin',
  45.                         'is_active' => 'is_active',
  46.                     ),
  47.                     'fields' => array(
  48.                         'lastlogin' => 'timestamp',
  49.                         'is_active' => 'boolean',
  50.                     ),
  51.                     'tables' => array(
  52.                         'users' => array(
  53.                             'fields' => array(
  54.                                 'lastlogin' => false,
  55.                                 'is_active' => false,
  56.                             ),
  57.                         ),
  58.                     ),
  59.                 )
  60.             )
  61.         ),
  62.     'permContainer' => array(
  63.         'type' => 'Medium',
  64.         'storage' => array(
  65.             'PDO' => array(
  66.                 'dsn'    => $dsn,
  67.                 'prefix' => 'liveuser_',
  68.                 'options' => array(
  69.                     'username'   => 'root',
  70.                     'password' => ''
  71.                 )
  72.              )
  73.         ),
  74.     ),
  75. );

Documentation generated on Mon, 11 Mar 2019 15:40:12 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.