CI 1.6 and MySQL 4.0 Character Set and Collation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: CI 1.6 and MySQL 4.0 Character Set and Collation (/showthread.php?tid=5803) Pages:
1
2
|
CI 1.6 and MySQL 4.0 Character Set and Collation - El Forum - 02-04-2008 [eluser]lookatthosemoose[/eluser] Hi folks, I just installed (fresh, not upgraded) to CI 1.6 using a MySQL 4.0 installation, and I'm having problems connecting to the DB. Specifically in regards to the new parameters in /config/database.php: Code: $db['default']['char_set'] = "utf8"; Quote:An Error Was Encountered I know that MYSQL 4.0 bunches the character set and the collation into 1 entity, and I'm assuming CI is handling the connection/setting character set for versions > 4.1. Honestly I'm not even sure what to ask here, I just need some help to be pointed in the right direction. HELP! --Eric-- CI 1.6 and MySQL 4.0 Character Set and Collation - El Forum - 02-04-2008 [eluser]Sean Murphy[/eluser] Character sets and collation were added in MySQL 4.1. They won't work in 4.0. CI 1.6 and MySQL 4.0 Character Set and Collation - El Forum - 02-04-2008 [eluser]lookatthosemoose[/eluser] Correct -- So i'm assuming I'd have to do a bit of modding to use CI 1.6 with MySQL 4.0 -- or does anyone w/ a good amount of knowledge behind the inner workings of how character sets are used in CI 1.6 , and if it would be feasible to do so (remove the mentions of character sets throughout the database class) Thanks! CI 1.6 and MySQL 4.0 Character Set and Collation - El Forum - 02-04-2008 [eluser]Derek Allard[/eluser] in your database.php, try setting your $db['default']['dbcollat'] to TRUE CI 1.6 and MySQL 4.0 Character Set and Collation - El Forum - 02-04-2008 [eluser]lookatthosemoose[/eluser] No luck there either. CI 1.6 and MySQL 4.0 Character Set and Collation - El Forum - 02-04-2008 [eluser]Derek Allard[/eluser] Sorry, I'm not sure what I was thinking. You know how sometimes your fingers are moving, and you know what you want to say... but something totally different comes out? Do this. Open up system/database/drivers/your_driver/your_driver.php Find the db_set_charset() function, in my MySQL driver this is around line 95. Change it to say Code: function db_set_charset($charset, $collation) CI 1.6 and MySQL 4.0 Character Set and Collation - El Forum - 02-04-2008 [eluser]Derek Jones[/eluser] Please see my response to this bug report thread, and the posts prior to it for a solution for a temporary work around until you are able to find a server that meet's CodeIgniter 1.6's requirements for MySQL. Edit: I went to get my mail and I see Derek Allard has replied. My link here is still relevant though as it pertains to CI's new MySQL requirements. CI 1.6 and MySQL 4.0 Character Set and Collation - El Forum - 02-04-2008 [eluser]lookatthosemoose[/eluser] Excellent -- thanks gentlemen CI 1.6 and MySQL 4.0 Character Set and Collation - El Forum - 02-04-2008 [eluser]lookatthosemoose[/eluser] I've added a quick and dirty wiki entry found at: http://codeigniter.com/wiki/MySQL_4.0/ CI 1.6 and MySQL 4.0 Character Set and Collation - El Forum - 02-04-2008 [eluser]Derek Jones[/eluser] Thank you for your contribution, lookatthosemoose, I'm sure other MySQL 4.0 users will appreciate it. |