News:

Join the Facebook Fan Page.

Main Menu

Converting from Phorum

Started by kltid, March 06, 2009, 07:22:18 AM

Previous topic - Next topic

kltid

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

ThorstenE

the MySQL user for both databases must be the same. SMF  needs at least read access to your phorum database

kltid

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"

ThorstenE

You also can use the same database for SMF and Phorum without issues. All SMF tables use a table prefix (default is smf_) .

kltid

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.

ThorstenE

can you check your phorum database with phpMyAdmin? maybe there is a table named priv_messages or similar?

kltid

The relevant tables appear to be:
phorum_pm_messages
phorum_pm_buddies
phorum_pm_xref
phorum_pm_folders
there is also a phorum_messages

SleePy

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).
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

evans.mutai

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?

ThorstenE

Our converter will copy the content (users, Posts, topics..) from your Phorum to a fresh installed SMF.
Converting to SMF

evans.mutai

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.

evans.mutai

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

SleePy

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

hhouwaard

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'

hhouwaard

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 [nofollow]_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

Oldiesmann

If you can give us the structure of your table, we can probably get things sorted out for you.
Michael Eshom
Christian Metal Fans

hhouwaard

#16
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


hhouwaard

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


hhouwaard

porum_pm_folders table structure
    Veld     Type CollatiAttributNullStandaar      Extra
pm_folder_idint(10)      UNSIGNEDNee Geen    AUTO_INCREMENT
  user_id   int(10)      UNSIGNEDNee        0

hhouwaard

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

Advertisement: