Hi everyone!
I'm also facing the same issue, i'm getting this error occasionally:
Code:
A PHP Error was encountered
Severity: Warning
Message: mysqli::real_connect() [mysqli.real-connect]: MySQL server has gone away
Filename: mysqli/mysqli_driver.php
Line Number: 135
Backtrace:
File: E:\wamp\www\ace_admin\application\controllers\Manager.php
Line: 10
Function: __construct
File: E:\wamp\www\ace_admin\index.php
Line: 292
Function: require_once
i'm auto loading my database like this:
Code:
$autoload['libraries'] = array('database', 'session');
and below are my database config settings:
Code:
$active_group = 'development';
$query_builder = TRUE;
$db['development'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'admin',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => TRUE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'autoinit' => TRUE,
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
I need a solution where i don't have to change my server's php settings, if not possible then need to suppress only this warning as it doesn't have any effect on my code, i'm reconnecting db on my models in their constructors.
Thanks.