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.                     'options' => array(
  39.                         'username'   => 'root',
  40.                         'password' => ''
  41.                     ),
  42.                     'alias' => array(
  43.                         'lastlogin' => 'lastlogin',
  44.                         'is_active' => 'is_active',
  45.                     ),
  46.                     'fields' => array(
  47.                         'lastlogin' => 'timestamp',
  48.                         'is_active' => 'boolean',
  49.                     ),
  50.                     'tables' => array(
  51.                         'users' => array(
  52.                             'fields' => array(
  53.                                 'lastlogin' => false,
  54.                                 'is_active' => false,
  55.                             ),
  56.                         ),
  57.                     ),
  58.                 )
  59.             )
  60.         ),
  61.     'permContainer' => array(
  62.         'type' => 'Medium',
  63.         'storage' => array(
  64.             'PDO' => array(
  65.                 'dsn'    => $dsn,
  66.                 'prefix' => 'liveuser_',
  67.                 'options' => array(
  68.                     'username'   => 'root',
  69.                     'password' => ''
  70.                 )
  71.              )
  72.         ),
  73.     ),
  74. );

Documentation generated on Mon, 11 Mar 2019 14:43:23 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.