FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Converters » phorum2fud???
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon12.gif  phorum2fud??? [message #3108] Wed, 12 June 2002 05:33 Go to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

Importing Categories haha dfgfdsg Finished Importing (2) Categories Importing Forums 0 asdf fdsg Finished Importing Forums Importing users 1 Admin Finished Importing users Importing Moderators 1 Finished Importing Moderators Importing (7) threads for dfgdsf Importing (13) messages for dfgdsf Importing (3) threads for fdsgsfdgd
--------------------------------------
Error in function/script: db.inc
has caused the following error: query failed: %( INSERT INTO k12_thread (
id,
forum_id,
root_msg_id
)
VALUES(
1,
4,
1
)
)% because %( Duplicate entry '1' for key 1 )%
while processing script name: c:/php4/php.exe
the error occured at: 12/06/2002 05:33:57
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
User Ip: 192.168.212.157
Script Accessed: f:\\htdocs\\201\\phorum.php

Query Failed: INSERT INTO k12_thread ( id, forum_id, root_msg_id ) VALUES( 1, 4, 1 )
Reason: Duplicate entry '1' for key 1
From: c:/php4/php.exe
Server Version: 3.23.46-nt
Re: phorum2fud??? [message #3165 is a reply to message #3108] Wed, 12 June 2002 18:34 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Could you please send me the MySQL datadump of your phorum data. I would like to see if I can replicate the problem on my test server.

FUDforum Core Developer
Re: phorum2fud??? [message #3169 is a reply to message #3165] Thu, 13 June 2002 01:01 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

thanks for your help! Razz
i have 270000 posts in 16 forums to convert from phorum to fudforum!

this just a test data:
  • Attachment: open.zip
    (Size: 11.11KB, Downloaded 1027 times)
Re: phorum2fud??? [message #3170 is a reply to message #3169] Thu, 13 June 2002 01:02 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Thanks for the data dump, I'll try to see what is wrong with the converter. Hopefuly, I'll be able to resolve the problems it had.

FUDforum Core Developer
Re: phorum2fud??? [message #3171 is a reply to message #3108] Thu, 13 June 2002 02:09 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Please try the attached conversion script, hopefuly it'll work.
  • Attachment: phorum.php
    (Size: 11.75KB, Downloaded 1013 times)


FUDforum Core Developer
Re: phorum2fud??? [message #3172 is a reply to message #3171] Thu, 13 June 2002 02:14 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

Importing Categories haha dfgfdsg Finished Importing (2) Categories Importing Forums 0 asdf fdsg Finished Importing Forums Importing users 1 Admin Finished Importing users Importing Moderators 1 Finished Importing Moderators Importing (7) threads for dfgdsf Importing (13) messages for dfgdsf Importing (3) threads for fdsgsfdgd Importing (5) messages for fdsgsfdgd
--------------------------------------
Error in function/script: db.inc
has caused the following error: query failed: %( INSERT INTO k12_msg
(
id,
thread_id,
poster_id,
post_stamp,
reply_to,
subject,
approved,
smiley_disabled,
host_name,
offset,
length,
file_id
)
VALUES
(
1,
8,
0,
1023847647,
0,
'sdfgdsfh',
'Y',
'N',
'zhangdebo',
4498,
8,
1
) )% because %( Duplicate entry '1' for key 1 )%
while processing script name: c:/php4/php.exe
the error occured at: 13/06/2002 02:16:25
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
User Ip: 192.168.212.157
Script Accessed: f:\\htdocs\\201\\phorum.php

Query Failed: INSERT INTO k12_msg ( id, thread_id, poster_id, post_stamp, reply_to, subject, approved, smiley_disabled, host_name, offset, length, file_id ) VALUES ( 1, 8, 0, 1023847647, 0, 'sdfgdsfh', 'Y', 'N', 'zhangdebo', 4498, 8, 1 )
Reason: Duplicate entry '1' for key 1
From: c:/php4/php.exe
Server Version: 3.23.46-nt
Re: phorum2fud??? [message #3173 is a reply to message #3172] Thu, 13 June 2002 02:54 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

/////////////////////
it worked well!



/////////////////////

/* import messages */

$r = Q2("SELECT *, UNIX_TIMESTAMP(datestamp) AS post_stamp
FROM
$tobj->table_name
LEFT JOIN
".$tobj->table_name."_bodies
ON $tobj->table_name.id=".$tobj->table_name."_bodies.id
ORDER BY $tobj->table_name.thread, $tobj->table_name.parent");

print_status("\tImporting (".DB_COUNT($r).") messages for $tobj->table_name");

while ( $obj = DB_ROWOBJ($r) ) {
$fileid = write_body(tags_to_html($obj->body), $len, $off);

Q("INSERT INTO ".$MYSQL_TBL_PREFIX."msg
(

thread_id,
poster_id,
post_stamp,
reply_to,
subject,
approved,
smiley_disabled,
host_name,
offset,
length,
file_id
)
VALUES
(

".$thread_arr[$obj->thread].",
$obj->userid,
$obj->post_stamp,
$obj->parent,
'".addslashes($obj->subject)."',
'Y',
'N',
".STRNULL($obj->host).",
".INTZERO($off).",
".INTZERO($len).",
$fileid
)");
}
QF($r);
unset($thread_arr);

[Updated on: Thu, 13 June 2002 02:57]

Report message to a moderator

Re: phorum2fud??? [message #3174 is a reply to message #3173] Thu, 13 June 2002 03:10 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Now I am confused heh...

So, did the script I send you work, or did it fail?


FUDforum Core Developer
Re: phorum2fud??? [message #3175 is a reply to message #3174] Thu, 13 June 2002 03:19 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

it fail!!

and i delete id and $obj->id in

/* import messages */

$r = Q2("SELECT *, UNIX_TIMESTAMP(datestamp) AS post_stamp
FROM
$tobj->table_name
LEFT JOIN
".$tobj->table_name."_bodies
ON $tobj->table_name.id=".$tobj->table_name."_bodies.id
ORDER BY $tobj->table_name.thread, $tobj->table_name.parent");

print_status("\tImporting (".DB_COUNT($r).") messages for $tobj->table_name");

while ( $obj = DB_ROWOBJ($r) ) {
$fileid = write_body(tags_to_html($obj->body), $len, $off);

Q("INSERT INTO ".$MYSQL_TBL_PREFIX."msg
(
id,
thread_id,
poster_id,
post_stamp,
reply_to,
subject,
approved,
smiley_disabled,
host_name,
offset,
length,
file_id
)
VALUES
(
$obj->id,
$obj->thread,
$obj->userid,
$obj->post_stamp,
$obj->parent,
'".addslashes($obj->subject)."',
'Y',
'N',
".STRNULL($obj->host).",
".INTZERO($off).",
".INTZERO($len).",
$fileid
)");
}
QF($r);
  • Attachment: phorum.php
    (Size: 11.73KB, Downloaded 989 times)
Re: phorum2fud??? [message #3176 is a reply to message #3175] Thu, 13 June 2002 03:30 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Oh I see...

So, the script I gave you did not work, but it began to work once you removed the $obj->id line.

I modified the script a little more and included the fix you have suggested. I had to add a little bit more code to keep track of IDs so that file attachments for messages can be properly imported.

The hopefuly working version of script is attached.
  • Attachment: phorum.php
    (Size: 11.83KB, Downloaded 1004 times)


FUDforum Core Developer
Re: phorum2fud??? [message #3177 is a reply to message #3175] Thu, 13 June 2002 03:32 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

I don't know whether it will produce other bugs. Rolling Eyes
icon12.gif  Re: phorum2fud??? [message #3178 is a reply to message #3177] Thu, 13 June 2002 04:22 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

Very Happy Very Happy Very Happy
it is very good!!
thank you very much!
Re: phorum2fud??? [message #3180 is a reply to message #3178] Thu, 13 June 2002 09:43 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

look the pic!

some root_msg_id error
Re: phorum2fud??? [message #3184 is a reply to message #3180] Thu, 13 June 2002 11:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hmmm I do not seem to see any errors on the screenshot you've provided.

FUDforum Core Developer
Re: phorum2fud??? [message #3199 is a reply to message #3184] Fri, 14 June 2002 01:20 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

sorry for my bad english!
  • Attachment: error.gif
    (Size: 58.28KB, Downloaded 1670 times)

[Updated on: Fri, 14 June 2002 01:25]

Report message to a moderator

Re: phorum2fud??? [message #3200 is a reply to message #3184] Fri, 14 June 2002 01:24 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

_thread.root_msg_id and _msg.id error!
Re: phorum2fud??? [message #3207 is a reply to message #3200] Fri, 14 June 2002 03:51 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I think I understand, the problem is that the subject of the thread, was fetched form message #2 in the thread, rather then message #1.

Correct?


FUDforum Core Developer
Re: phorum2fud??? [message #3217 is a reply to message #3207] Fri, 14 June 2002 04:36 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Does the error affects only the thread that you've shown me, or does it affect ALL threads?

FUDforum Core Developer
Re: phorum2fud??? [message #3221 is a reply to message #3217] Fri, 14 June 2002 04:56 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

yes,it's affected all the threads.
Re: phorum2fud??? [message #3224 is a reply to message #3108] Fri, 14 June 2002 05:58 Go to previous messageGo to next message
Ecxeleron is currently offline  Ecxeleron   Australia
Messages: 187
Registered: January 2002
Location: Australia
Karma: 0
Senior Member
yo, can I see your new fud (ex phorum) Very Happy Just out of curiocity Smile


[Updated on: Fri, 14 June 2002 06:15]

Report message to a moderator

Re: phorum2fud??? [message #3229 is a reply to message #3224] Fri, 14 June 2002 06:45 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

http://www.zdb.levillage.org/bbs


data from phorum
Re: phorum2fud??? [message #3230 is a reply to message #3108] Fri, 14 June 2002 06:50 Go to previous messageGo to next message
Ecxeleron is currently offline  Ecxeleron   Australia
Messages: 187
Registered: January 2002
Location: Australia
Karma: 0
Senior Member
thank you Smile


Re: phorum2fud??? [message #3231 is a reply to message #3230] Fri, 14 June 2002 09:21 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

i am so exciting!!!!
i am succeed !!!!

in order to Convert data from phorum to fud ,i have to change some fields of table fud_thread and fud_msg!

you can see the file now!!

mr prottoss ,could you check it if has another bugs and rewrite it,thanks:)
  • Attachment: phorum.php
    (Size: 12.23KB, Downloaded 867 times)

[Updated on: Fri, 14 June 2002 09:23]

Report message to a moderator

Re: phorum2fud??? [message #3237 is a reply to message #3231] Fri, 14 June 2002 16:05 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I've managed to track down the bug which was causing this problem and have solved. The fixed conversion script is attached.
  • Attachment: phorum.php
    (Size: 12.37KB, Downloaded 878 times)


FUDforum Core Developer
Re: phorum2fud??? [message #3361 is a reply to message #3237] Wed, 19 June 2002 08:09 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

could you add some code to support search the new data?

i think
clear fud_search,fud_index,fud_title_index

and add new data from phorum

thanks! Very Happy
Re: phorum2fud??? [message #3362 is a reply to message #3361] Wed, 19 June 2002 15:07 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
No new code is needed, you simply need to run 'Rebuild Search Index', it is an option in the admin control panel.

FUDforum Core Developer
Re: phorum2fud??? [message #3373 is a reply to message #3362] Thu, 20 June 2002 00:49 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

haha ~~~~~~~~~~`

thank you very much!!!!! Laughing

[Updated on: Mon, 24 June 2002 08:17]

Report message to a moderator

Re: phorum2fud??? [message #3466 is a reply to message #3373] Mon, 24 June 2002 08:19 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

Importing Categories
Finished Importing (1) Categories
Importing Forums 0
网页制作论坛
课程整合论坛
Finished Importing Forums
Importing users 259282
a110
a1111

--------------------------------------
Error in function/script: db.inc
has caused the following error: query failed: %( INSERT INTO k12_users
(id,
login,
passwd,
email,
home_page,
icq,
aim,
yahoo,
msnm,
append_sig,
sig,
email_conf,
coppa,
join_date
)
VALUES (2,
'a1111',
'f83e9bb067afe8f6123e427d69560c52',
'',
'',
NULL,
'',
'',
'',
'N',
NULL,
'Y',
'N',
1024906730
) )% because %( Duplicate entry '' for key 2 )%
while processing script name: c:/php4/php.exe
the error occured at: 24/06/2002 08:18:51
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
User Ip: 192.168.212.157
Script Accessed: f:\\htdocs\\20\\111.php

Query Failed: INSERT INTO k12_users
(id,
login,
passwd,
email,
home_page,
icq,
aim,
yahoo,
msnm,
append_sig,
sig,
email_conf,
coppa,
join_date
)
VALUES (2,
'a1111',
'f83e9bb067afe8f6123e427d69560c52',
'',
'',
NULL,
'',
'',
'',
'N',
NULL,
'Y',
'N',
1024906730
)
Reason: Duplicate entry '' for key 2
From: c:/php4/php.exe
Server Version: 3.23.46-nt

/////////////////
help Sad
Re: phorum2fud??? [message #3471 is a reply to message #3466] Mon, 24 June 2002 14:57 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
It would appear you have 2 users, who have the same login name, FUDforum requires the login names to be unique, hence the problem you are seeing.
Attached to this message is a patched import script made to address this particular problem.
  • Attachment: phorum.php
    (Size: 12.40KB, Downloaded 1036 times)


FUDforum Core Developer
Re: phorum2fud??? [message #3479 is a reply to message #3471] Tue, 25 June 2002 00:59 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

You do not have the required permissions to perform this action

!!!!why can't i download the file phorum.php?
Re: phorum2fud??? [message #3480 is a reply to message #3479] Tue, 25 June 2002 01:13 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

i have too big data to to convert !!!

if it can convert 10000 Records each time ?
Re: phorum2fud??? [message #3481 is a reply to message #3479] Tue, 25 June 2002 01:36 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
ezdb wrote on Mon, 24 June 2002 20:59

You do not have the required permissions to perform this action

!!!!why can't i download the file phorum.php?


That was a bug, fixed now Smile


FUDforum Core Developer
Re: phorum2fud??? [message #3482 is a reply to message #3480] Tue, 25 June 2002 01:37 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
ezdb wrote on Mon, 24 June 2002 21:13

i have too big data to to convert !!!

if it can convert 10000 Records each time ?


Why, sure it is possible, but you'll need to hack up the script for that perpouse. Best solution, is to set time limit to a large number.


FUDforum Core Developer
Re: phorum2fud??? [message #3483 is a reply to message #3482] Tue, 25 June 2002 01:50 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

THANKS!
I will try it!
Re: phorum2fud??? [message #3486 is a reply to message #3471] Tue, 25 June 2002 07:18 Go to previous messageGo to next message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma: 0
Senior Member

prottoss wrote on Mon, 24 June 2002 22:57

It would appear you have 2 users, who have the same login name, FUDforum requires the login names to be unique, hence the problem you are seeing.
Attached to this message is a patched import script made to address this particular problem.



change
$r = Q2("SELECT * FROM ".$PHORUM['main_table']."_auth GROUP BY login ORDER BY id DESC");
to
$r = Q2("SELECT * FROM ".$PHORUM['main_table']."_auth GROUP BY name ORDER BY id DESC");

==============
Error in function/script: db.inc
has caused the following error: query failed: %( INSERT INTO k12_users
(
id,
login,
passwd,
email,
home_page,
icq,
aim,
yahoo,
msnm,
append_sig,
sig,
email_conf,
coppa,
join_date
)
VALUES (
311110,
'f1985721',
'b96cfe65071acc103ce7b32b4cbd85d4',
'f1985721(at)k12(dot)com(dot)cn',
'',
NULL,
'',
'',
'',
'N',
NULL,
'Y',
'N',
1024989478
) )% because %( Duplicate entry '311110' for key 1 )%
while processing script name: c:/php4/php.exe
the error occured at: 25/06/2002 07:18:01
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Re: phorum2fud??? [message #3488 is a reply to message #3486] Tue, 25 June 2002 13:57 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Before I issue the fix, please verify the problem for me.

Do a select on the _auth table with the following query, and show me the result that you get:

SELECT * FROM ".$PHORUM['main_table']."_auth WHERE id=311110;

Note: replace the ".$PHORUM['main_table']." with the table name.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Converters
Next Topic: Trouble Converting from Phorum
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Dec 11 21:07:54 GMT 2024

Total time taken to generate the page: 0.02817 seconds