Welcome Guest, Not a member yet? Register   Sign In
DB_driver.php file possible error
#1

[eluser]Unknown[/eluser]
I am trying to connect to any database using codeigniter from a Windows 7 OS.

First I tried using SQLite then In installed SQLExpress2008, but still cannot connect, I simply get a blank screen with no information as to what has gone wrong.

I did raise the logging level to 4 - which should report All Error Messages.

Next, I took a look at the DB_driver.php file and noticed that reference to 'mysql' is hard coded - see below, and wondered if this was in fact an error.

In any case I need some help from anyone as how to connect to either SQLite or SQLExpress2008 from Codeigniter. Code examples would be welcomed.

Thanks

Code:
class CI_DB_driver {

    var $username;
    var $password;
    var $hostname;
    var $database;
    var $dbdriver        = 'mysql';
    var $dbprefix        = '';
    var $char_set        = 'utf8';
    var $dbcollat        = 'utf8_general_ci';
    var $autoinit        = TRUE; // Whether to automatically initialize the DB
    var $swap_pre        = '';
    var $port            = '';
    var $pconnect        = FALSE;
    var $conn_id        = FALSE;
    var $result_id        = FALSE;
    var $db_debug        = FALSE;
    var $benchmark        = 0;
    var $query_count    = 0;
    var $bind_marker    = '?';
    var $save_queries    = TRUE;
    var $queries        = array();
    var $query_times    = array();
    var $data_cache        = array();
    var $trans_enabled    = TRUE;
    var $trans_strict    = TRUE;
    var $_trans_depth    = 0;
    var $_trans_status    = TRUE; // Used with transactions to determine if a rollback should occur
    var $cache_on        = FALSE;
    var $cachedir        = '';
    var $cache_autodel    = FALSE;
    var $CACHE; // The cache class object
#2

[eluser]toopay[/eluser]
It just a defined value, i believe. Nothing wrong with define a default value in a class variable. You always can overide it by define the dbdriver value on database.php under config folder.




Theme © iAndrew 2016 - Forum software by © MyBB