Firefox PHP

Phorum3 to 5-Conversion-Script ... new Version

Posted by Thomas Seifert 
Phorum3 to 5-Conversion-Script ... new Version
April 26, 2003 01:19PM
Hey folks,

there is a new version of that conversion-script in the CVS, which fixes mostly problems with magic_quotes_runtimes and a syntax error in the query for the conversion of moderators.

[dev.phorum.org]
additionally the "input-layer":
[dev.phorum.org]


Missing is still the conversion of folders and usergroups and user2group-relation.





Edited 6 time(s). Last edit at 03/31/2005 11:26AM by ts77.
I've got a large forum with 370,000 messages in it and the conversion script can't cope it seems. It terminates early building the array. It might be an idea for a later version of the conversion script to not use an array like this.
Re: Phorum3 to 5-Conversion-Script ... new Version
April 30, 2003 06:07PM
you may try to run it on the console then, its designed that way.
Re: Phorum3 to 5-Conversion-Script ... new Version
April 30, 2003 08:32PM
Hey Thomas, I edited your post to point to the latest version no matter what. That way, people can pick up the changes I made today.
Actually, I was running it on the console. ;-)

I presume it's just running out of RAM building the array?
Re: Phorum3 to 5-Conversion-Script ... new Version
May 08, 2003 07:05AM
You can boost PHP's memory limit from the default 8 MB. For some reason I think that is not the reason thou. Can you provide the exact error message or little more detailed report.

Panu
Sorry for not getting back so quick.

There's not a lot to add. It just says 'Terminated'. I know it's got as far as building the array from adding in echos. If it's not the memory then perhaps it's taking longer than the max execution time.

Unfortunately I can't test it again as I don't have access to that big a forum now. ;-)
I am having a slight problem with converting the data from Phorum 3.4.4 to Phorum 5 with the script. Here is the output from the script (I followed the instructions word for word):
I am using Apache 2.046, PHP 4.3.2 and MySQL 4.0.13

Reading forums from phorum3-table forums ...
Writing forumdata ...
Duplicate entry '1' for key 1 -> INSERT INTO phorum_forums (forum_id,name,active,description,template,folder_flag,parent_id,list_length,read_length,moderation,email_outgoing_address,email_incoming_address,email_subject_tag,threaded,float_to_top,sec_public,sec_reg,display_ip_address,allow_email_notify,language,email_moderators,edit_post) VALUES(1,'Pending Admissions',1,'This is where Pending Admissions are discussed','default',0,0,30,20,0,'','','',1,0,20,20,1,0,'english',0,1);
Reading postings for forum Pending Admissions...
Reading maximum message-id from messages-table...

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\Program Files\BigApache\Apache\htdocs\hospupg\phorum3.php on line 124
Writing postings for forum Pending Admissions...
.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+
Updating forum-statistics:

Writing forumdata ...
Reading postings for forum Admissions...
Reading maximum message-id from messages-table...

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\Program Files\BigApache\Apache\htdocs\hospupg\phorum3.php on line 124
Writing postings for forum Admissions...
.
Notice: Undefined index: datestamp in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 29

Notice: Undefined index: user_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 31

Notice: Undefined index: author in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 32

Notice: Undefined index: message_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 33
+.
Notice: Undefined index: datestamp in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 29

Notice: Undefined index: user_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 31

Notice: Undefined index: author in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 32

Notice: Undefined index: message_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 33
+.
Notice: Undefined index: datestamp in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 29

Notice: Undefined index: user_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 31

Notice: Undefined index: author in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 32

Notice: Undefined index: message_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 33
+.
Notice: Undefined index: datestamp in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 29

Notice: Undefined index: user_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 31

Notice: Undefined index: author in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 32

Notice: Undefined index: message_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 33
+.
Notice: Undefined index: datestamp in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 29

Notice: Undefined index: user_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 31

Notice: Undefined index: author in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 32

Notice: Undefined index: message_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 33
+.
Notice: Undefined index: datestamp in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 29

Notice: Undefined index: user_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 31

Notice: Undefined index: author in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 32

Notice: Undefined index: message_id in C:\Program Files\BigApache\Apache\htdocs\hospupg\include\thread_info.php on line 33
+
Updating forum-statistics:

Writing forumdata ...
Reading postings for forum Discontinued...
Reading maximum message-id from messages-table...

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\Program Files\BigApache\Apache\htdocs\hospupg\phorum3.php on line 124
Writing postings for forum Discontinued...
.Duplicate entry '14' for key 1
Query: INSERT INTO phorum_messages (message_id, forum_id, thread, parent_id, author, subject, body, email, ip, status, msgid, modifystamp, sort, datestamp, user_id) VALUES(14, 6,14, 0, 'ghiller', 'Clevenger, Ada', 'expired 7/6/03 - milestone', '', '117-HAVENN', 2, '<085aaea25e6cde0a966de1f0ef730f98.Discontinued>', '1057855252' , 2, '1057855251', '3')
Duplicate entry '14' for key 1: select phorum_messages.* from phorum_messages where (forum_id = 6 OR forum_id=0) and thread=14 order by message_id

It gets about 1/2 of the way through the conversion and that seems to be it.
Re: Phorum3 to 5-Conversion-Script ... new Version
July 14, 2003 12:07PM
did you take the latest version from this thread?
which phorum5-version do you use?
This error comes from both the 5.01 Alpha-Dev version and the CVS version of Phorum 5 that I downloaded. I tried the script from this thread and also the one packaged with the CVS version of Phorum 5. Both the script from the Phorum 5 CVS Package and the script from this thread produce the same message.
I found a "Work Around"

This is what was halting the script:
.Duplicate entry '14' for key 1
Query: INSERT INTO phorum_messages (message_id, forum_id, thread, parent_id, author, subject, body, email, ip, status, msgid, modifystamp, sort, datestamp, user_id) VALUES(14, 6,14, 0, 'ghiller', 'Clevenger, Ada', 'expired 7/6/03 - milestone', '', '117-HAVENN', 2, '<085aaea25e6cde0a966de1f0ef730f98.Discontinued>', '1057855252' , 2, '1057855251', '3')
Duplicate entry '14' for key 1: select phorum_messages.* from phorum_messages where (forum_id = 6 OR forum_id=0) and thread=14 order by message_id

I re-arranged the Message ID's to get no Duplicates and that seems to have fixed the problem. (I.E. making Forum 1 threads = 1000,1001,1002..., Forum 2 threads = 2000,2001,2003, etc.)

Now, on the other hand, I am getting an error message from PHP when I read an old message. It says:
Posted by:
Notice: Undefined index: linked_author in C:\Temp\tpl-default-read_threads-0e7e6b263df37bd6950c3e9df59ac131.php on line 9
(
Notice: Undefined index: ip in C:\Temp\tpl-default-read_threads-0e7e6b263df37bd6950c3e9df59ac131.php on line 9
)
Date:
Notice: Undefined index: datestamp in C:\Temp\tpl-default-read_threads-0e7e6b263df37bd6950c3e9df59ac131.php on line 10

Instead of
Posted by: UserName (IP Address)

Is there any way short of going through and re-posting everything to get this to resolve?

Re: Phorum3 to 5-Conversion-Script ... new Version
July 15, 2003 09:16AM
hmm, the message-id should be incremented for each forum, strange that it didn't work in your case.

in list-view it works without warnings? you are running the latest cvs-snapshot, right?
May I get a copy of your phorum5-db if its not too private or large?

For the upgrade-problem, which software are you running? Webserver, MySQL with versions please.
Regarding the DB - it is "confidential", but if I remove the names and such, I will be able to send you the DB.

I am using Apache 2.046 as the server and I am using MySQL 4.0.13 as the DB server. Let me do a little playing around to see what I can do on my end before I send the DB out.
oh, I forgot to mention (I am a scatterbrain) that I am using version phorum5-cvs-2003071417 (that's what the admin says anyway)
ok - this now seems like someone was playing a cruel joke on me. I dropped and recreated the DB, then I did exactly as I had done before, but this time the script worked perfectly. I can't explain it. Anyway everything works well! Thanks everyone
Age Manocchia
Re: Phorum3 to 5-Conversion-Script ... new Version
September 16, 2003 03:17PM
I know the views hack wasn't really part of Phorum 3, but is there any plan to have the script optionally migrate the "views" field into the metadata of the Phorum 5 messages? It would be nice not to lose all that.
Re: Phorum3 to 5-Conversion-Script ... new Version
September 16, 2003 05:05PM
not planned
Re: Phorum3 to 5-Conversion-Script ... new Version
September 30, 2003 12:50PM
Can anyone else access this script in the CVS at the moment? If I tried CVSweb (via the link Brian posted), I get the following error:

"Error

Error: Unexpected output from cvs co: Insecure dependency in exec while running with -T switch at /www/dev.phorum/cvsweb/cvsweb.cgi line 1262.
Check whether the directory /home/cvsroot/CVSROOT exists and the script has write-access to the CVSROOT/history file if it exists.
The script needs to place lock files in the directory the file is in as well. "

I've tried moving up the tree to [dev.phorum.org], where I get a totally different error:

"Error: Failed to spawn GNU rlog on '/home/cvsroot/phorum5//admin.php,v, /home/cvsroot/phorum5//common.php,v, /home/cvsroot/phorum5//index.php,v, /home/cvsroot/phorum5//list.php,v, /home/cvsroot/phorum5//login.php,v, /home/cvsroot/phorum5//post.php,v, /home/cvsroot/phorum5//read.php,v, /home/cvsroot/phorum5//register.php,v, /home/cvsroot/phorum5//todo.txt,v, /home/cvsroot/phorum5//profile.php,v, /home/cvsroot/phorum5//control.php,v, /home/cvsroot/phorum5//edit.php,v, /home/cvsroot/phorum5//search.php,v, /home/cvsroot/phorum5//moderation.php,v, /home/cvsroot/phorum5//file.php,v, /home/cvsroot/phorum5//subscribe.php,v, /home/cvsroot/phorum5//features.txt,v'
did you set the $ENV{PATH} in your configuration file correctly ?"

I get these no matter how many times I try to reload the page (so it's not a one-off glitch) and being CGI it's server-side so the browser I'm using shouldn't make any difference.
Re: Phorum3 to 5-Conversion-Script ... new Version
September 30, 2003 05:44PM
this is the new url:
[dev.phorum.org]

we had to switch the script because of the server outage.
Re: Phorum3 to 5-Conversion-Script ... new Version
October 03, 2003 02:34PM
The new URL appears to work fine - thanks!
At converting the messages from Phorum3 in Phorum5, the converting interrupts in an any place. In total of messages about 16000. Interrupts in area 1000. Script is started through web. In what there can be a problem?

Excuse for bad English.
Re: Phorum3 to 5-Conversion-Script ... new Version
October 23, 2003 07:33AM
You may have run into an script-timeout.
check the settings of your host and run it from a console if possible.
Can the script convert folders and permission groups yet?

can't wait to upgrade but my users will hate me if they can't access all their groups right away.

thank

rob
Re: Phorum3 to 5-Conversion-Script ... new Version
November 28, 2003 07:21PM
nope and probably won't be done as permissions are too different to be able to easily convert them.
Re: Phorum3 to 5-Conversion-Script ... new Version
December 09, 2003 02:51AM
There's still a bug in the script that's quite obvious for those of us who use a separate database for Phorum 3 and Phorum 5.

The error is in line 123, which reads:

$res=mysql_query("SELECT max(message_id) from ".$PHORUM["message_table"], $oldlink);

This should be $newlink instead of $oldlink. The script crashes for me the way this is, but the change I suggest makes it work.

-- codeman38
Re: Phorum3 to 5-Conversion-Script ... new Version
December 22, 2003 02:11AM
The script gives me the following error..

Unknown column 'sec_public' in 'field list' -> INSERT INTO phorum_forums (forum_id,name,active,description,template,folder_flag,parent_id,list_length,read_length,moderation,email_outgoing_address,email_incoming_address,email_subject_tag,threaded,float_to_top,sec_public,sec_reg,display_ip_address,allow_email_notify,language,email_moderators,edit_post) VALUES(2,'Events',1,'A forum to talk about upcoming events and events of yore. Things to celebrate things to improve etc.... (to prominantly post events in the \"Events\" section... email events@tribalharmonix.org )','default',0,0,40,20,0,'','','',0,1,PHORUM_USER_ALLOW_POST,PHORUM_USER_ALLOW_POST,2,1,'english',0,1);



what is this field that the script thinks should be there but is not there?
Re: Phorum3 to 5-Conversion-Script ... new Version
December 22, 2003 02:13AM

Also I had to add this to line 127:

$mdata['email'] = mysql_escape_string($mdata['email']);

i guess it was possible to get bad data into the email in some version of phorum 3..

r.

Re: Phorum3 to 5-Conversion-Script ... new Version
December 22, 2003 02:52AM

also if called from the web this script is sure to time out on any large forum..

i had to put a set_time_limit() in there..

r
Re: Phorum3 to 5-Conversion-Script ... new Version
February 14, 2004 04:50PM
Hello
I have problem:

Writing forumdata ...
Nieznana kolumna 'threaded' w field list -> INSERT INTO mtk_forum_forums /.../

"Nieznana kolumna" - in english "Unknown column"

i use phorum5 from cvs dated in valentine day 14.02.2004 ;)

Re: Phorum3 to 5-Conversion-Script ... new Version
February 14, 2004 05:03PM
That's not the end of problems with this conversion script. The problem is in older structure of phorum_forums table used in phorum3to5convert script.
Sorry, only registered users may post in this forum.

Click here to login