News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Common conversion errors.

Started by JayBachatero, January 28, 2007, 01:18:43 PM

Previous topic - Next topic

JayBachatero

This is a topic for common errors that you might experience while converting to SMF.

Problem: SELECT command denied to user
Info: The cause of this error is that SMF and Software X are in separate databases and the SMF database user does not have access to Software X's database.
Fix: If your host has cPanel you can add the SMF database user to Software X's database.  If your host does not have cPanel you can contact them with regards on how to accomplish this. As well as a last resort, what you can do is reinstall SMF in the same database as Software X.

Problem: Conversion says it finished successfully, but nothing got converted.
Info: The cause of this problem is that your host has session.save_path to a non writeable directory.
Fix: Ask your host to change this setting in php.ini and use the correct path or if you are with Powweb they allow you to change settings in php.ini file. There change the path to the session dir that resides in your site's root dir.

Problem:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LENGTH(code) DESC' at line 2
Note: This fix only applies for convert.php or a .sql/.php converter file. If you are looking for a SMF fix, please check the Wiki.
Info: The cause of this is a change in MySQL's accepted syntax.
Fix: Open the convert.php and find this section of code:

      convert_query("
         ALTER TABLE {$to_prefix}smileys
         ORDER BY LENGTH(code) DESC");

Replace this section with:

      convert_query("
         ALTER TABLE {$to_prefix}smileys
         ORDER BY code DESC");

A similar code may be in the .sql/.php converter file. If its a .php file it will look similar to the above code. If it is a .sql file, it would look similar to the below code, and can be removed as the convert.php will handle this query. If you do find this code in a .sql/.php (that isn't convert.php), please post a message in regards to this so we can update our converters if it was missed.

ALTER TABLE {$to_prefix}smileys
ORDER BY LENGTH(code) DESC;



Problem: I receive "Duplicate entry '255' for key 1" during the conversion of categories or boards.
Info: The cause of this issue is the software you have converted from is using a category ID higher than 255. It is unrealistic why you would need more than 255 categories by default.
Fix: The fix is quiet simple, you use phpMyAdmin to alter the smf_categories and smf_boards for their ID_CAT (id_cat in SMF 2.0+) to hold a bigger value. A bigint of 4 should due just fine in most cases.
Note: This may cause issues with upgrading in the future such as upgrading to 2.0 where all the columns are now lower case (and camel case removed). Please be aware of this for the future of upgrading your board.
As well, you may try out our [Beta] Tool to correct High ID_CAT values, which will only fix current values for after the conversion. Although if you stop after the first step, it is safe to continue the conversion.


Problem: My forum has weird symbols after converting in its posts/members/boards
Info This is usually a result of a incorrect character set in the database during the conversion process. To fix this, you should use UTF-8 while converting.
Fix: In general you will on the convert screen, select the database collation that you where using on your forum.
As well, in the Administration Center > Forum Maintenance, you will find a link to convert HTML entities to UTF-8 (If you do not see this you are not using UTF-8 yet). This may fix these symbols.
Please see our UTF-8 Conversion topic for more information.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Advertisement: