guntersammet Posted December 21, 2004 Share Posted December 21, 2004 Hi all: I had to install a new development environment and I thought I'll upgrade to one of the newer versions of MySQL and PHP. So I installed xampp. When I tried to run any OSC shop, I encountered the following error: 1267 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '<' delete from whos_online where time_last_click < '1103587787' [TEP STOP] After reading a few posts in other forums I tried changing the following function: function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') { global $$link; if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); mysql_query("SET NAMES 'latin1'", $$link); } else { $$link = mysql_connect($server, $username, $password); mysql_query("SET NAMES 'latin1'", $$link); } if ($$link) mysql_select_db($database); return $$link; } It seems like " mysql_query("SET NAMES 'latin1'", $$link);" takes care of the charset error. Didn't try to debug the php 5 errors. For now I am running MySQL 4.1.7 and PHP 4.3.9. xampp allows you to switch from 4.3 to 5 through clicking a link. Whenever I get around, I will experiment with php 5 but for now I thought that might help some otheres solving this issue. BTW, I haven't checked yet if there will be any problems regarding character display. If yes, I will post again. HTH Gunter Link to comment Share on other sites More sharing options...
Guest Posted January 21, 2005 Share Posted January 21, 2005 Sir I have the same error 1267 - Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (big5_bin,IMPLICIT) for operation 'find_in_set' select admin_files_id from admin_files where FIND_IN_SET( '1', admin_groups_id) and admin_files_is_boxes = '1' and admin_files_name = 'configuration.php' Can you me more about fix the problem,really thank you Link to comment Share on other sites More sharing options...
Guest Posted March 28, 2005 Share Posted March 28, 2005 I've just run into the same errror when trying to formulate some custom queries through phpMyAdmin.... After pulling my hair out for a few minutes, I finally realized the initial phpMyAdmin Welcome screen has a " MySQL connection collation:" drop-down box.... The default was utf_general_ci. After I changed it to latin1_swedish_ci, all my problems went away. :D Hope this helps. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.