• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
An Error Was Encountered - Invalid DB driver ?

#1
Hi,

I believe I have made all the necessary settings to work with mysql database in CI3 3.1.11 but I come across invalid drive, the server I use is Apache2, Mysql-server5.7.28, Php7.3 below follows my settings and error print:

File autoload.php, setup :
Code:
$autoload['libraries'] = array('database');

File database.php, setup :

Code:
$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
    'dsn'    => '',
    'hostname' => 'localhost',
    'username' => 'myuser',
    'password' => 'mypass',
    'database' => 'mydatabase',
    'dbdriver' => 'mysqli',
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => (ENVIRONMENT !== 'production'),
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);


File config.php, setup to session work with database :

Code:
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_sessions';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = TRUE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;


error message -> An Error Was Encountered - Invalid DB driver ?

Reply

#2
Make an empty file containing only the following, looks like you haven't installed mysqli. Or you haven't activated it in your php.ini file.

Code:
<?php phpinfo(); ?>

And press CTRL+F and search for "mysqli".
Reply

#3
(11-20-2019, 11:15 AM)jreklund Wrote: Make an empty file containing only the following, looks like you haven't installed mysqli. Or you haven't activated it in your php.ini file.

Code:
<?php phpinfo(); ?>

And press CTRL+F and search for "mysqli".

Don't be this problem as it runs on an earlier version.

Reply

#4
Earlier version of what?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.