CodeIgniter icon indicating copy to clipboard operation
CodeIgniter copied to clipboard

Don't close db connection if using pconnect

Open stefanomozart opened this issue 14 years ago • 0 comments

CI always closes the database connection, even if a permanent connection was (deliberately) established.

At CodeIgniter.php end, should check if $CI->db is set and if $database['pconnect'](from config/databse.php) is FALSE

If $database['pconnect'] is TRUE, there should be a way for the db object to be serialized, instead, and unserialized in the next request. Or, at least, keep the connection resource on session, and use it when reloading the DB class.

stefanomozart avatar Apr 19 '12 16:04 stefanomozart