Welcome Guest, Not a member yet? Register   Sign In
Session database driver BUG
#1
Wink 

Hello, yesterday I was working with codeigniter 3.0.0. I made a system user to review new features, and I found a bug when you share session based on a table of mysql codeigniter, MySQL returns an error. The error is given because the class system/libraries/Session/driversSession_database_driver.php in the driver database is referring to "mysql" and not "mysqli". I you replace all "mysql" with "mysqli" it runs perfectly.

I hope my contribution helps someone else if they encounter this problem.

Tongue
Reply
#2

thanx elponchotrucker for the valuable information. Dont forget to mention CI officials about the bug :-)
Reply
#3

There's no such bug. In fact, if you replace 'mysql' with 'mysqli' in there - you're more likely to break something.
Reply
#4

Given the number of times it checks the platform against 'mysql' and 'postgre', they should probably be constants. That might also make it a little more obvious that the 'mysql' in
Code:
if (strpos($db_driver, 'mysql') !== FALSE)
isn't the same thing as the 'mysql' in the rest of the file.

At best, if the behavior changed by changing 'mysql' to 'mysqli', it's because you're using the PDO driver or the deprecated MySQL driver and you failed over to using dummy locks for your session. Whatever error your database was trying to tell you about still exists, but you're not even trying to get a lock from your database any more, so you're just not being told about the problem.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB