Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: kltid on March 06, 2009, 07:22:18 AM

Title: Converting from Phorum
Post by: kltid on March 06, 2009, 07:22:18 AM
I'm trying to convert but I get the message

The error MySQL gave was: Access denied for user 'smf'@'192.168.0.%' to database 'phorum'

Both databases are on the same server
Title: Re: Converting from Phorum
Post by: ThorstenE on March 06, 2009, 02:56:50 PM
the MySQL user for both databases must be the same. SMF  needs at least read access to your phorum database
Title: Re: Converting from Phorum
Post by: kltid on March 09, 2009, 02:16:39 PM
Is the a simple patch/edit to overcome the need to have the same user on both databases.
My hosting company refuses to give one user access to both database "for security reasons"
Title: Re: Converting from Phorum
Post by: ThorstenE on March 09, 2009, 02:30:07 PM
You also can use the same database for SMF and Phorum without issues. All SMF tables use a table prefix (default is smf_) .
Title: Re: Converting from Phorum
Post by: kltid on March 17, 2009, 12:52:41 PM
All looking good apart from the conversion of PM's which gives
Converting personal messages (step 1)... Unsuccessful!
This query:
    SELECT
    p.private_message_id AS ID_PM, p.from_user_id AS ID_MEMBER_FROM,
    p.datestamp AS msgtime,
    SUBSTRING(IFNULL(u.username, p.from_username), 1, 255) AS fromName,
    SUBSTRING(p.subject, 1, 255) AS subject,
    SUBSTRING(p.message, 1, 255) AS body, p.from_del_flag AS deletedBySender
    FROM `phorum`.phorum_private_messages AS p
    LEFT JOIN `phorum`.phorum_users AS u ON (u.user_id = p.from_user_id)
    LIMIT 0, 500;

Caused the error:

    Table 'phorum.phorum_private_messages' doesn't exist

Anyone seen this before?
I assume the answer is - find out the name of the table in Phorum version 5.1.15 and edit the convert.php file - unfortunately I don't know the first or how to do the second.
Title: Re: Converting from Phorum
Post by: ThorstenE on March 18, 2009, 03:41:38 AM
can you check your phorum database with phpMyAdmin? maybe there is a table named priv_messages or similar?
Title: Re: Converting from Phorum
Post by: kltid on March 18, 2009, 06:45:05 AM
The relevant tables appear to be:
phorum_pm_messages
phorum_pm_buddies
phorum_pm_xref
phorum_pm_folders
there is also a phorum_messages
Title: Re: Converting from Phorum
Post by: SleePy on March 20, 2009, 06:04:52 PM
Our converter was developed for Phorum 5.

I guess they changed this in 5.1

On the phorum_pm_messages,
Could you click Structure.
Then post or pm the Table that you get.

This is how the table is setup. This way I can know if they just changed the table name, or also the column names (and/or complicated things more).
Title: Re: Converting from Phorum
Post by: evans.mutai on June 16, 2009, 04:21:37 AM
hi, sorry for my noob question but  what happens when i run the convert.php? does it overwrite files or does it back up and create new files?
Title: Re: Converting from Phorum
Post by: ThorstenE on June 16, 2009, 10:47:09 AM
Our converter will copy the content (users, Posts, topics..) from your Phorum to a fresh installed SMF.
Converting to SMF (http://docs.simplemachines.org/index.php?board=4.0;sort=subject)
Title: Re: Converting from Phorum
Post by: evans.mutai on June 17, 2009, 08:16:00 AM
hi i got a problem while converting from phorum to smf
please help

heres the error log

Converting topics... Successful.
Converting posts (this may take some time)... Unsuccessful!
This query:

    INSERT INTO `forum`.smf_messages
    (ID_MSG, ID_TOPIC, posterTime, ID_MEMBER, SUBSTRING(m.subject, 1, 255), posterEmail, posterName, ID_BOARD, posterIP, body, modifiedName, icon)
    VALUES ('1', '1', '1196379009', '0', 'Test Message', '', 'Phorum Installer', '2', '127.0.0.1', 'This is a test message.
Title: Re: Converting from Phorum
Post by: evans.mutai on June 17, 2009, 08:21:12 AM
then at the bottom of the error it says

Caused the error:

    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 'SUBSTRING(m.subject, 1, 255), posterEmail, posterName, ID_BOARD, posterIP, body,' at line 2
Title: Re: Converting from Phorum
Post by: SleePy on July 05, 2009, 04:55:27 PM
Try the attached file.
Title: Re: Converting from Phorum
Post by: hhouwaard on October 03, 2011, 02:20:28 PM
I tried this attachment because I ran into the same error. It gives the following result:

Converting...
Converting members...Unknown column 'memberName' in 'field list'
Title: Re: Converting from Phorum
Post by: hhouwaard on October 03, 2011, 05:33:18 PM
Converting...
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Removing polls... Successful.
Converting personal messages (step 1)... Unsuccessful!
This query:

    SELECT
    p.pm_message_id AS id_pm, p.from_user_id AS id_member_from,
    p.datestamp AS msgtime,
    SUBSTRING(IFNULL(u.username, p.from_username), 1, 255) AS from_name,
    SUBSTRING(p.subject, 1, 255) AS subject,
    SUBSTRING(p.message, 1, 255) AS body, p.from_del_flag AS deleted_by_sender
    FROM `CN20050958_rock`.phorum_pm_messages AS p
    LEFT JOIN `CN20050958_rock`.phorum_users AS u ON (u.user_id = p.from_user_id)
    LIMIT 0, 500;

Caused the error:

    Unknown column 'p.from_user_id' in 'field list'

This error is the result of a completely different setup for the private messages tables. If anyone can help me out getting the phorum_to_smf.sql file setup correctly I would be most greatful.

Hans
Title: Re: Converting from Phorum
Post by: Oldiesmann on October 03, 2011, 08:05:30 PM
If you can give us the structure of your table, we can probably get things sorted out for you.
Title: Re: Converting from Phorum
Post by: hhouwaard on October 04, 2011, 03:28:42 AM
phorum_pm_messages table
     Veld        Type        Collatie     AttributNullStandaar      Extra
pm_message_id int(10)                     UNSIGNEDNee Geen    AUTO_INCREMENT
   user_id    int(10)                     UNSIGNEDNee        0
    author    varchar(255utf8_general_ci          Nee
   subject    varchar(100utf8_general_ci          Nee
   message    text       utf8_general_ci          Nee Geen
  datestamp   int(10)                     UNSIGNEDNee        0
     meta     mediumtext utf8_general_ci          Nee Geen

Title: Re: Converting from Phorum
Post by: hhouwaard on October 04, 2011, 03:30:50 AM
phorum_pm_xref table structure
         Veld              Type        Collatie     Attribut  Null  Standaar Extra
      pm_xref_id       int(10)                      UNSIGNEDNee     Geen    AUTO_INCREMENT
        user_id        int(10)                      UNSIGNEDNee            0
     pm_folder_id      int(10)                      UNSIGNEDNee            0
    special_folder     varchar(10) utf8_general_ci          Ja      NULL
     pm_message_id     int(10)                      UNSIGNEDNee            0
       read_flag       tinyint(1)                           Nee            0
      reply_flag       tinyint(1)                           Nee            0

Title: Re: Converting from Phorum
Post by: hhouwaard on October 04, 2011, 03:38:08 AM
porum_pm_folders table structure
    Veld     Type CollatiAttributNullStandaar      Extra
pm_folder_idint(10)      UNSIGNEDNee Geen    AUTO_INCREMENT
  user_id   int(10)      UNSIGNEDNee        0
Title: Re: Converting from Phorum
Post by: hhouwaard on October 04, 2011, 03:40:54 AM
phorum_pm_buddies table structure
        Veld          Type  CollatieAttribut  Null  Standaar Extra
    pm_buddy_id     int(10)         UNSIGNEDNee     Geen    AUTO_INCREMENT
      user_id       int(10)         UNSIGNEDNee            0
   buddy_user_id    int(10)         UNSIGNEDNee            0
Title: Re: Converting from Phorum
Post by: Oldiesmann on October 07, 2011, 09:30:42 PM
Ok. Is the "xref" table the one that contains information about the person who sent the message?
Title: Re: Converting from Phorum
Post by: hhouwaard on October 08, 2011, 01:32:32 AM
I have look at the content in the tables and it seems to me to be like this:

phorum_pm_messages contains the messages, together with the sender id, (author id and author name). With the message_id you can lookup the rest of the information on the private message in the xref table, where the user_id signifies the receiver. Here read, reply and folder information is kept. So you need a join of these 2 tables to have all needed information to convert to smf.

Hope this helps,

Hans
Title: Re: Converting from Phorum
Post by: Oldiesmann on October 08, 2011, 12:28:01 PM
Ok. Should be pretty easy to fix then. Which sql file were you using with convert.php?
Title: Re: Converting from Phorum
Post by: hhouwaard on October 09, 2011, 04:38:33 AM
I tried both the phorumtosmf.sql included with the converter package and the phorumtosmf.sql file included with this thread. Both give errors with wrong table names etc.

Thanks,

Hans
Title: Re: Converting from Phorum
Post by: sveneld on October 29, 2011, 03:51:52 AM
Here it is fixed version for converting
Title: Re: Converting from Phorum
Post by: hhouwaard on October 29, 2011, 01:09:29 PM
There are a lot of error in the table name for SMF itself in this file. Lots of tables have capitals for names which are lowercase and some have tableField where it should be table_field.

I have tried to correct the sql file for this, I now get this response:
Converting...
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Removing polls... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)...Duplicate entry '653-6' for key 'PRIMARY'
Title: Re: Converting from Phorum
Post by: sveneld on October 30, 2011, 04:15:09 AM
Quote from: hhouwaard on October 29, 2011, 01:09:29 PM
There are a lot of error in the table name for SMF itself in this file. Lots of tables have capitals for names which are lowercase and some have tableField where it should be table_field.
I haven't receive any error when use this script. I work with clear installed versions of Phorum and SMF, possibly you have made changes in your tables. Or you use it with SMF version 2.0 instance of SMF 1.1.15

Quote from: hhouwaard on October 29, 2011, 01:09:29 PM
I have tried to correct the sql file for this, I now get this response:
Converting...
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Removing polls... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)...Duplicate entry '653-6' for key 'PRIMARY'

This error is going from php file convert.php. They tried to recalculate some stats. But you can make this in smf.
After using this script I got all forums, messages and users in SMF.
Title: Re: Converting from Phorum
Post by: hhouwaard on October 30, 2011, 05:28:23 AM
I do use Phorum 5.2.15 and SMF 2. So that could explain it. I will go and see if all users and messages indeed made the transfer to SMF. Thanks for the help!

Hans
Title: Re: Converting from Phorum
Post by: Wualala on November 05, 2013, 10:09:41 PM
Please upgrade this converter to the last version of phorum!!!  the current version dont works!
Title: Re: Converting from Phorum
Post by: Oldiesmann on November 06, 2013, 02:24:31 PM
Wualala, which version of Phorum are you using, and what problems are you experiencing with the current converter?