• Welcome to Simple Machines Community Forum. Please login or sign up.
September 18, 2021, 03:02:49 AM

News:

SMF 2.0.18 has been released! Please update. Read more.


New site problem / Illegal mix of collations

Started by OvermindDL1, February 09, 2005, 01:40:56 AM

Previous topic - Next topic

OvermindDL1

February 09, 2005, 01:40:56 AM Last Edit: March 01, 2005, 01:06:51 PM by andrea
I just installed the lates public version of SMF on a temp server that should have everything operational except sendmail, which I am not going to put on anyways.  The address is "overminddl1.no-ip.info:2326/forum/".  It will not be visible to the net once it is operational.  I have tried a few other php scripts (and perl and python) and they work thus far, not as complex as a forum yet, but I'll be putting my other test things on later.  This has essentially the same settings as my real test server except for sendmail and that mysql is located on another computer. 

So far the site works 'somewhat'.  Admin info is User:OvermindDL1 Pass:tempadmin .  Fee free to look around and try and figure what the problem is if anyone is interested, the thing will be reimaged after work tomarrow (or just its current state will not be saved upon shutdown actually).  Because the server is not entirely real and it has a few other things running on it, don't fret with page generation times of over 5 seconds, when I get the real test server back together it can serv em up in no time, just need this working for now.  Anyone interested to play with this, you can see an immediate problem if you see the front page as a guest, or if you see the admin panel's front page.  And on near everypage there is a variable name = to the webserver's email, why is this appearing?

Note:  IE users, be sure to put http:// in front of the address or 100-to-1, it will not resolve, all other browsers seem fine.


Edit: subject text clarified

Elissen

Your error log is filled with these messages:

Database Error: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'find_in_set'

You might want to look here. If I understand it correctly your mysql server and mysql clients are using different character sets causing these problems. Changing the configuration of mysql should solve that. If it is the actual cause of the slow page times, I don't know.

Disableling hostname lookups doesn't do the trick (you might want to turn that back on in admin -> options and features -> 2nd part)

OvermindDL1

Will check the MySQL settings when I get back home.  Thanks for that, never experienced that error before.

[Unknown]

I suggest you use Latin1, not UTF-8, for tables unless using PHP 5... and even if, really.

-[Unknown]

mytreo

Quote from: [Unknown] on February 11, 2005, 02:29:45 AM
I suggest you use Latin1, not UTF-8, for tables unless using PHP 5... and even if, really.

-[Unknown]

Why? will using UTF-8 cause any problems? (MySQL 4.1.10)

I ask because I am also getting the "Illegal mix of collations" error on our new server - although only in the thread bookmark mod for some reason?

Our SMF DB is entirely utf-8 but the MySQL on our new machine is currently set to use Latin1, which I guess is what is causing this error. I was going to change MySQL to use utf-8 (which is how I had the old server setup) instead of making all the tables Latin1? Any advice?

BTW is there a reason why this problem seems to be cropping up with several people all at once?

Cheers
Chris
Treo forum - Powered by SMF, of course
Treo news - powered by MovableType and integrated with SMF
Treo downloads - hacked from phpNuke and integrated with SMF
Treo knowledge base - powered by Wikka and integrated with SMF
Treo 650 | Treo 700w | Treo 700p

[Unknown]

Quote from: mytreo on March 01, 2005, 12:58:04 PM
Why? will using UTF-8 cause any problems? (MySQL 4.1.10)

It won't if PHP's client MySQL library is connecting with UTF-8, but in PHP 4 this is not usually the case.

QuoteI ask because I am also getting the "Illegal mix of collations" error on our new server - although only in the thread bookmark mod for some reason?

Strange... there might be other places it occurs.  Generally, it happens if you do this:

SELECT CONCAT('literal string', column)
...;

Because the literal string is Latin1, but the column is UTF-8.

QuoteOur SMF DB is entirely utf-8 but the MySQL on our new machine is currently set to use Latin1, which I guess is what is causing this error. I was going to change MySQL to use utf-8 (which is how I had the old server setup) instead of making all the tables Latin1? Any advice?

That may work, depending on how PHP was compiled and what version you're using.  Another option is to change all the tables to be Latin1.

SMF can still store UTF-8 data even if the table is Latin1, in most cases.

QuoteBTW is there a reason why this problem seems to be cropping up with several people all at once?

MySQL 4.1.x, which is now the stable release of MySQL, properly supports collations and gives the option to use UTF-8 by default in its Windows installer.  MySQL 4.0.x did not do these things.

-[Unknown]

antracit

November 08, 2005, 05:28:24 PM #6 Last Edit: November 08, 2005, 05:30:34 PM by antracit
Hello

Sorry to ask about this but I'm stuck. I get this falt when trying to access my board. I've tried to change smf tables to latin1 but that did not help?

Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation 'ifnull'
Fil: C:\apachefriends\xampp\htdocs\antracitportal\smf\Sources\BoardIndex.php
Rad: 82


I've even tried to use an old database and that gave same falt. Also been laborating with backing up database and trying to change to latin1... This happened when I did in hurry stopped my Xampp server and started it again.

I'm with Win XP pro,
Mambo 4.5.2 ,
MySQL 4.1.14-nt ,
PHP Version 5.0.5 ,
Apache 2.0.54

and SMF 1.0.5. together with Coppermine.

link with Mambo
http://www.antracit.se/forum/index.php?option=com_smf&Itemid=160

link standalone
http://www.antracit.se/smf/
:-X  ???

Advertisement: