CI_DB_driver Bug? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: CI_DB_driver Bug? (/showthread.php?tid=81) |
CI_DB_driver Bug? - Gavin - 11-03-2014 In the course of using codeigniter, occasionally following error, do not know bug? Code: A PHP Error was encountered RE: CI_DB_driver Bug? - kenji - 11-03-2014 I don't think is a CI bug http://dev.mysql.com/doc/refman/5.5/en/gone-away.html RE: CI_DB_driver Bug? - Rufnex - 11-03-2014 This should be a problem of you server settings or installations and could be erverything. Try to use mysql instead of mysqli. RE: CI_DB_driver Bug? - kilishan - 11-03-2014 I've seen this happen on a project that I worked on before. I think the server settings had a 5 minute timeout and we were doing some long running processes that ended up losing connection. You can use Code: $this->db->reconnect(); RE: CI_DB_driver Bug? - InsiteFX - 11-03-2014 This can be caused by several different things. You can try the following: MySQL my.cnf or windows my.ini max_allowed_packet = 32M wait_timeout = <huge number> connect_timeout = <also a huge number> php.ini mysql.connect_timeout = -1 RE: CI_DB_driver Bug? - Gavin - 11-04-2014 Thanks for everybody! Add $this->db->reconnect(); in MY_Model has been resolved RE: CI_DB_driver Bug? - Narf - 11-04-2014 (11-03-2014, 09:29 AM)Rufnex Wrote: This should be a problem of you server settings or installations and could be erverything. That driver is deprecated both by CI and by PHP itself, please don't recommend it. RE: CI_DB_driver Bug? - Rufnex - 11-04-2014 @Narf: you're right .. i forgott to write just for checking the connection stuff for indicate it it is a persisten connection problem. RE: CI_DB_driver Bug? - summer - 02-10-2015 Hi everyone! I'm also facing the same issue, i'm getting this error occasionally: Code: A PHP Error was encountered 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'; 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. RE: CI_DB_driver Bug? - InsiteFX - 02-10-2015 Did you try using: PHP Code: $this->db->reconnect(); |