I'm developing a Web application using version 3.1.9 of Codeigniter
, but I'm having trouble connecting to the database.
Follow configuration:
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => 'mysql:host=localhost; port=3306; dbname=tarifador; charset=utf8',
'hostname' => 'localhost',
'username' => 'root',
'password' => '******',
'database' => 'tarifador',
'dbdriver' => 'pdo',
'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
);
Error presented:
A PHP Error was encountered
Severity: Warning
Message: PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers
Filename: pdo/pdo_driver.php
Line Number: 136
Backtrace:
File: C:\xampp\htdocs\index.php
Line: 315
Function: require_once
A Database Error Occurred
SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers
Filename: C:/xampp/htdocs/system/database/drivers/pdo/pdo_driver.php
Line Number: 142
In the database Schema is already set to UTF8 e UT8_general_ci
.
I've also tried using the mysqli
driver.
Additional details: PHP version: 5.6.37 MySQL Version: 8.0.12
Thanks to anyone who can help