phorum2fud??? [message #3108] |
Wed, 12 June 2002 05:33 |
|
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 |
Ilia
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 |
|
thanks for your help!
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 1028 times)
|
|
|
Re: phorum2fud??? [message #3170 is a reply to message #3169] |
Thu, 13 June 2002 01:02 |
Ilia
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 #3172 is a reply to message #3171] |
Thu, 13 June 2002 02:14 |
|
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 |
|
/////////////////////
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 |
Ilia
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 |
|
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 991 times)
|
|
|
|
|
|
|
Re: phorum2fud??? [message #3184 is a reply to message #3180] |
Thu, 13 June 2002 11:42 |
Ilia
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 #3207 is a reply to message #3200] |
Fri, 14 June 2002 03:51 |
Ilia
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 |
Ilia
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 #3231 is a reply to message #3230] |
Fri, 14 June 2002 09:21 |
|
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 868 times)
[Updated on: Fri, 14 June 2002 09:23] Report message to a moderator
|
|
|
|
Re: phorum2fud??? [message #3361 is a reply to message #3237] |
Wed, 19 June 2002 08:09 |
|
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!
|
|
|
Re: phorum2fud??? [message #3362 is a reply to message #3361] |
Wed, 19 June 2002 15:07 |
Ilia
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 #3466 is a reply to message #3373] |
Mon, 24 June 2002 08:19 |
|
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
|
|
|
|
|
|
|
Re: phorum2fud??? [message #3482 is a reply to message #3480] |
Tue, 25 June 2002 01:37 |
Ilia
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 #3486 is a reply to message #3471] |
Tue, 25 June 2002 07:18 |
|
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 |
Ilia
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
|
|
|