Location: PHPKode > projects > MembersGear > membersgear/config/pearSettings_smarty_settings.php
<?php
    require_once "db.php";
    $db = new activeDBLib($dsn['phptype']);
    $db->debug(); # catch all errors and exit the application if any
    $db->connect($dsn['hostspec'], $dsn['username'], $dsn['password'], MEMBERSGEAR_DB_NAME);

    // Inclue Php Ajax Component
    //require(INCLUDE_DIR."\phpajax\phpajax.php");    
    //require_once("includes\phpajax\phpajax.php"); 
    //require_once(INCLUDE_DIR."\phpajax\phpajax.php"); 

    // Include Pear MDB2 Plugin 
    ini_set('include_path', PHYSICAL_DIR."/PEAR");
    //require_once(PHYSICAL_DIR.  '/PEAR/MDB2.php'); 

     //ini_set('include_path', ini_get('include_path'));
    //echo '../..'.PATH_SEPARATOR.ini_get('include_path');die;
    // require the MDB2 code                 
    //set_time_limit(300);
    require_once 'MDB2.php';

    // define and set a PEAR error handler
    // will be called whenever an unexpected PEAR_Error occurs
    function handle_pear_error ($error_obj)
    {
        print '<pre><b>PEAR-Error</b><br />';
        echo $error_obj->getMessage().': '.$error_obj->getUserinfo();
        print '</pre>';
    }
    PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'handle_pear_error');

   
     global $smarty;
    $smarty = new Smarty;
    $smarty->template_dir   = PHYSICAL_DIR.'/templates/';
    $smarty->compile_dir    = PHYSICAL_DIR.'/templates_c/';

    $smarty->debug_dir      = PHYSICAL_DIR.'/smarty/debug/';
    $smarty->config_dir     = PHYSICAL_DIR.'config/smarty_configs/';



    $smarty->assign('PHYSICAL_DIR',     PHYSICAL_DIR);

    //MDB2
    global $mdb2;
    $mdb2 =& MDB2::factory($dsn);
    $mdb2->setDatabase(MEMBERSGEAR_DB_NAME);     //This constant is set into db.php

    // With PEAR::isError you can differentiate between an error or
    // a valid connection.
    if (PEAR::isError($mdb2)) 
    {
        die (__LINE__.$mdb2->getMessage());
    }
       
    
?>
Return current item: MembersGear