I'm doing a test with the codeigniter framework 3.1.5 and trying to connect to the database it has the following error:
Fatal error: Call to undefined function mysqli_init ()
The complete error description:
Fatal error: Call to undefined function mysqli_init ()
in C: \ vm \ system \ database \ drivers \ mysqli \ mysqli_driver.php on line 135
A PHP Error was encountered Severity: Error
Message: Call to undefined function mysqli_init ()
Filename: mysqli / mysqli_driver.php
Line Number: 135
Backtrace:
I really want to know where I'm going wrong! My scenario is very simple:
- Windows 10 Enterprise
- PHP 5.6.1 installed
- Using the built-in PHP server
php -S localhost:8080
- MySQL installed on version 5.7.18 port 3309
The CI configuration code databese:
active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => 'root',
'database' => 'blog',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => TRUE,
'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,
'port'=>'3309'
);
I want to know what's wrong there?