• Welcome to Simple Machines Community Forum. Please login or sign up.
October 17, 2021, 01:42:24 AM

News:

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


e107 0.7.16 to SMF 1.1

Started by mostym, February 17, 2010, 10:18:02 PM

Previous topic - Next topic

mostym

Hi, I love your forums, but im having some with issues with my conversion.  Any help would be appreciated.

Converting...
Converting members... Successful.
Converting additional member groups...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/ndsunive/public_html/forums/convert.php(941) : eval()'d code on line 13

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/ndsunive/public_html/forums/convert.php(941) : eval()'d code on line 37
Successful.
Converting categories... Successful.
Converting boards... Unsuccessful!
This query:
SELECT
DISTINCT f.forum_id AS ID_BOARD, SUBSTRING(f.forum_name, 1, 255) AS name,
SUBSTRING(f.forum_description, 1, 65534) AS description,
CASE
WHEN f.forum_parent > 500
THEN f.forum_parent - 499
ELSE f.forum_parent
END AS ID_CAT, f.forum_sub AS ID_PARENT,
CASE WHEN f.forum_sub = 0 THEN 0 ELSE 1 END AS childLevel, f.forum_threads AS numTopics,
f.forum_threads + f.forum_replies AS numPosts, f.forum_order AS boardOrder,
CASE f.forum_class
WHEN 252 THEN '-1'
WHEN 255 THEN ''
WHEN 253 THEN '0'
WHEN 251 THEN '0'
WHEN 254 THEN ''
WHEN 0 THEN '-1,0'
ELSE IFNULL(mg.ID_GROUP, '')
END AS memberGroups
FROM (`ndsunive_e107old`.e107_forum AS f, `ndsunive_e107old`.e107_forum AS c)
LEFT JOIN `ndsunive_e107old`.e107_userclass_classes AS uc ON (uc.userclass_id = f.forum_class)
LEFT JOIN `ndsunive_e107old`.smf_membergroups AS mg ON (mg.groupName = CONCAT('e107 ', uc.userclass_name))
WHERE f.forum_parent != 0
LIMIT 0, 500;
Caused the error:

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation '='

Norv

It seems that some of your tables in the database have a collation latin1_swedish_ci, and others, latin1_general_ci. It would be useful to: connect with phpMyAdmin, and list the tables in your e107 database. What is the collation listed for them? Making a screenshot may help.
The same for your SMF database. What is the collation of the tables listed in phpMyAdmin, when you choose the database > Structure tab?

They should be the same, all, in order to avoid problems.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

mostym

It looks like they were different, however, even setting the table to latin1_general_ci, im still getting the same error.

Norv

Quote from: mostym on February 18, 2010, 05:13:13 AM
It looks like they were different, however, even setting the table to latin1_general_ci, im still getting the same error.

What do you mean, which table? There was only one table with latin1_swedish_ci?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

mostym

the smf tables were all latin1_swedish_ci, and some of the e107 were latin1_swedish_ci as well.  So I changed all of the tables to latin1_general_ci

Norv

Can you please post the entire current error message?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

mostym

This is the full error

Converting...
Converting members... Successful.
Converting additional member groups...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/ndsunive/public_html/forums/convert.php(941) : eval()'d code on line 13

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/ndsunive/public_html/forums/convert.php(941) : eval()'d code on line 37
Successful.
Converting categories... Successful.
Converting boards... Unsuccessful!
This query:
SELECT
DISTINCT f.forum_id AS ID_BOARD, SUBSTRING(f.forum_name, 1, 255) AS name,
SUBSTRING(f.forum_description, 1, 65534) AS description,
CASE
WHEN f.forum_parent > 500
THEN f.forum_parent - 499
ELSE f.forum_parent
END AS ID_CAT, f.forum_sub AS ID_PARENT,
CASE WHEN f.forum_sub = 0 THEN 0 ELSE 1 END AS childLevel, f.forum_threads AS numTopics,
f.forum_threads + f.forum_replies AS numPosts, f.forum_order AS boardOrder,
CASE f.forum_class
WHEN 252 THEN '-1'
WHEN 255 THEN ''
WHEN 253 THEN '0'
WHEN 251 THEN '0'
WHEN 254 THEN ''
WHEN 0 THEN '-1,0'
ELSE IFNULL(mg.ID_GROUP, '')
END AS memberGroups
FROM (`ndsunive_e107old`.e107_forum AS f, `ndsunive_e107old`.e107_forum AS c)
LEFT JOIN `ndsunive_e107old`.e107_userclass_classes AS uc ON (uc.userclass_id = f.forum_class)
LEFT JOIN `ndsunive_e107old`.smf_membergroups AS mg ON (mg.groupName = CONCAT('e107 ', uc.userclass_name))
WHERE f.forum_parent != 0
LIMIT 0, 500;
Caused the error:

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation '='

Norv

Well, it seems there still are tables with those two collations.

You could also see them if you: select each database, and go to the Export tab. Export the structure (only the structure, not data), and look at the result. Search the result like any text file, for the text "latin1_swedish_ci" and please take a look at the line where you find it: most likely a statement starting with CREATE TABLE name_of_table_here.

Please note that if a table has a certain collation, then most likely the text-based fields in it also have the same collation. Probably that is the problem: those tables must be fully converted to latin1_general_ci, that is, their fields as well, not only the table itself.

Please make sure you make a full backup of your e107 database before converting character sets and collations, even though these two should be compatible; operations with databases and specially with character sets and collations are not famous for their reliability...
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

mostym

I dumped the database to a sql file then searched.  I did a search for latin1_swedish_ci, and it returned nothing.  Any other thoughts?

Norv

That's odd... Did it really dump the structure, are the other collations listed in the file?
Sorry for the delay. If this is still a problem, please tell, what exactly is the last error?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: