phpBB2 to FUDforum converter [message #166115] |
Sun, 18 September 2011 19:33 |
|
ShineOn
Messages: 53 Registered: July 2011
Karma: 1
|
Member |
|
|
Thanks.
Hey, remember me saying something about how I'm migrating phpbb2 => phpbb3 => FUD, and asking about a phpbb2 converter, and you said I should send you a copy of my phpbb2 forum and you'd write a converter?
I don't know if I should start a fresh topic on this but, I tried making my own and it's just sitting there after saying it's reading the phpbb2 config. It doesn't look like it's doing anything and it doesn't throw an error, so it's almost as though it exits the routine without ending or something.
One thing I noticed is that with the plugin for password conversion, that the phpbb2 password hash is identical to the fud password hash, and that the phpbb3 hash is not, and the plugin doesn't always let you log in with your old password and then convert it to the FUD hash - but if we copy the phpbb2 password field to the fud password field, no problems (even though the seed field isn't set to null).
Could the handling of the different password hash be where conversion using my phpbb2 map is exiting early/failing/hanging? I tried debugging with xdebug and eclipse but stepping through the convert.php using my phpbb2 map doesn't give me a clue on where it's failing (or exiting early.)
I like that you're willing to write me a converter map but I don't know that I could sell sending you a copy of my forum to the other admins/mods... if I should post this elsewhere, please let me know... Thanks!
[Updated on: Sun, 18 September 2011 19:36] Report message to a moderator
|
|
|
|
|
|
|
|
Re: phpBB2 to FUDforum converter [message #166182 is a reply to message #166115] |
Sun, 09 October 2011 11:40 |
|
ShineOn
Messages: 53 Registered: July 2011
Karma: 1
|
Member |
|
|
Thanks, naudefj!
I will try this out as soon as I can.
By the way, I have found a couple of issues with my prior conversion (using phpbb3 as a middle step). Don't know if these are addressed in your latest phpBB2 conversion map or not...
1) Some bbcode doesn't translate, for example [list]. Does FUDforum have the [list] bbcode? Do I have to add that?
2) Internal links do not translate well. Any links within a topic/post that redirect to another topic/post within the forum appear broken. The phpbb "viewtopic.php/viewforum.php" functionality is apparently in the index.php script in FUDforum, and the forum/topic/message number variables are different, even though the numbers referenced match up. I will get more info to you on that, if you want to address this in the converter. It would be nice if the messages were checked for internal forum post links which would be translated from <webroot>/viewtopic.php?etc. or <webroot>/viewforum.php?etc. to the FUDforum <webroot>/index.php?etc. topic/message URL format, so the internal links aren't broken post-conversion.
3) Any external links to the forum will also be broken, because although the forum ID, topic ID and post ID are all consistent, the URL format is different. Is there a possibility of perhaps a plugin that would "unbreak" external links so someone linking to your site with the phpbb format link would have it translated to the FUDforum url for the same forum/topic number, or will all of those external links also be broken?
4) There appears to be a difference in max message length between my phpbb forum and FUD. Is there a way to either detect messages that would be truncated or change the max message length to match the source forum?
|
|
|
Re: phpBB2 to FUDforum converter [message #166185 is a reply to message #166182] |
Sun, 09 October 2011 12:54 |
|
naudefj
Messages: 3771 Registered: December 2004
Karma: 28
|
Senior Member Administrator Core Developer |
|
|
ShineOn wrote:1) Some bbcode doesn't translate, for example [list]. Does FUDforum have the [list] bbcode? Do I have to add that?
It was fixed a while ago. Lists should now be converted. If you see any other BBcode problems, let us know so we can fix them.
ShineOn wrote:2) Internal links do not translate well. Any links within a topic/post that redirect to another topic/post within the forum appear broken. The phpbb "viewtopic.php/viewforum.php" functionality is apparently in the index.php script in FUDforum, and the forum/topic/message number variables are different, even though the numbers referenced match up. I will get more info to you on that, if you want to address this in the converter. It would be nice if the messages were checked for internal forum post links which would be translated from <webroot>/viewtopic.php?etc. or <webroot>/viewforum.php?etc. to the FUDforum <webroot>/index.php?etc. topic/message URL format, so the internal links aren't broken post-conversion.
I'm sure we can implement it. Mail me a couple of examples to work on.
ShineOn wrote:3) Any external links to the forum will also be broken, because although the forum ID, topic ID and post ID are all consistent, the URL format is different. Is there a possibility of perhaps a plugin that would "unbreak" external links so someone linking to your site with the phpbb format link would have it translated to the FUDforum url for the same forum/topic number, or will all of those external links also be broken?
You can always re-map URLs with .htaccess rewrite rules.
ShineOn wrote:4) There appears to be a difference in max message length between my phpbb forum and FUD. Is there a way to either detect messages that would be truncated or change the max message length to match the source forum?
Message formats are different and there is no direct way of comparing them.
The easiest would be to find the longest message in phpBB and check if it complete in FUDforum.
|
|
|
Re: phpBB2 to FUDforum converter [message #166187 is a reply to message #166185] |
Sun, 09 October 2011 16:42 |
|
ShineOn
Messages: 53 Registered: July 2011
Karma: 1
|
Member |
|
|
naudefj, using the latest svn of convert.php and your new (thank you!) phpbb2 conversion map, I get the same curious result as when I tried making my own phpbb2 conversion map, where it stops after displaying "reading config file <path to phpbb2 root>/config.php"
I have more than one functioning instance of the phpbb2 forum site (test/dev and production) and using neither one as the source path gets past that display. Can you suggest a way to get more detailed logging (without having access to php.ini) so I can troubleshoot this? I'm getting nothing in my error_log, and I'm using "verbose" in the convert.php option.
Is there an error logging feature of the convert.php subsystem that I can turn on, that might log to the fud_data/errors directory or something like that?
Also, regarding the long message truncation - the field types are the same, so there shouldn't be any truncation in the database, so if the message is complete there, wouldn't it be something in FUDforum limiting how many characters will fit in a message body?
I will check the database to see if the messages I've noticed are truncated in FUDforum are complete in the database and report back.
<edit> The message is truncated in the DB field. Could it have been truncated in the process of moving messages from the file store to the DB store?</edit>
<edit2> I think the problem with the convert.php exiting may be not in config.php but in includes/constants.php. I am trying to find a "vanilla" constants.php for phpBB2 to see where it may be breaking the process. </edit2>
<edit3> Yep. We have the torrent pier mod, and there's an "include once" for includes/constants_bt.php in constants.php. Commenting out that include once statement allowed the conversion to run.
I will let you know how it went when I have a chance to check it out. </edit3>
<edit4> It seemed to convert ok, BUT...
When I ran the consistency check afterward, it blew away all of the smiley icons.
</edit4>
<edit5> - ok - the smilies thing was my fault. Not blown away.
However, none of the smilies appear in the posts. The smilies "tags" are there as text. With tens of thousands of posts that would be a real pain in the rear to manually fix all the smilies.
The conversion seems to work well other than that - the smilies not showing up in the posts, and the permalinks not being translated.
naudefj, if you're going to do the link conversion, it might be best to have it convert to path-style URLs if that option is turned on, otherwise to standard FUDforum url format.
I can try to handle external links using htaccess rewrite rules.
Please let me know if you're going to do the internal link conversion. Thanks!
<edit5>
[Updated on: Tue, 11 October 2011 20:50] Report message to a moderator
|
|
|
Re: phpBB2 to FUDforum converter [message #166358 is a reply to message #166115] |
Fri, 25 November 2011 02:30 |
|
ShineOn
Messages: 53 Registered: July 2011
Karma: 1
|
Member |
|
|
New issue with the phpBB2 converter:
The IP addresses are still in hex format in the user table, the format that phpBB2 stores IP addresses in.
Only new posts show the dotted-decimal notation which the IP address checking tools use, so you can't check on a user's IP address by clicking on what displays from an old message, and you can't check to see what other users have posted from a dotted-decimal-notation IP because the hexadecimal format is stored in the table for old messages.
I could have sworn that was working, but I hadn't noticed one way or the other because I wasn't checking for that.
I really would rather not re-convert. Too many changes were made post-conversion to make it worthwhile. Is there an easy way to change the IP addresses from hex to dotted-decimal in all the messages, like a standard function or something, or would a program have to be written from scratch to do this?
[Updated on: Fri, 25 November 2011 02:31] Report message to a moderator
|
|
|
|
|
|
Re: phpBB2 to FUDforum converter [message #166365 is a reply to message #166362] |
Fri, 25 November 2011 16:30 |
|
ShineOn
Messages: 53 Registered: July 2011
Karma: 1
|
Member |
|
|
I tested this and it doesn't work. I still get the phpbb2 hex-format addresses.
I believe the problem may be that you're using is_numeric testing against the phpbb2 hex-valued IP address without prepending 0x to the field value. The phpbb2 ip format does not include the 0x prefix but simply the four hex-pairs.
Hex numbers don't return true to is_numeric unless they are in notation "0xff...ff" - without the 0x it evaluates as a string.
I think perhaps simply testing for length of 8 with no dots would suffice. Anything else wouldn't have to pass through the hex-to-decimal function.
I suggest this because 10.2.3.4 is a valid dotted-decimal IP address with length of 8.
You could test for length of 8 and if not 8 just pass the value, and test for a dot in the hex-to-decimal function, so you don't have to regex every record.
<edit> - I see that you are testing for strlen == 8 in the function, so I don't see the value of testing the ip_addr message field before sending it to the function... </edit>
<edit2>Frank, I commented out the test for is_numeric for message ip_addr and changed the insert routine to match the pm ip_addr line, using the decode_ip function, and it converted the IP's fine.
/* if (is_numeric($message['ip_addr'])) {
$message['ip_addr'] = decode_ip($message['ip_addr']);
}
*/
q('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'msg
(id, thread_id, poster_id, post_stamp, update_stamp, updated_by, subject,
ip_addr, foff, length, file_id, msg_opt, apr
) VALUES (
'. $message['id'] .',
'. (int)$message['thread_id'] .',
'. (int)$message['poster_id'] .',
'. (int)$message['post_stamp'] .',
'. (int)$message['update_stamp'] .',
'. (int)$message['updated_by'] .',
'. _esc($message['subject']) .',
'. _esc(decode_ip($message['ip_addr'])) .',
'. $off .',
'. $len .',
'. $file_id .',
'. (int)$message['msg_opt'] .',
1)'
);
}
</edit2>
[Updated on: Fri, 25 November 2011 19:48] Report message to a moderator
|
|
|
|
|
|
|
Re: phpBB2 to FUDforum converter [message #168343 is a reply to message #167919] |
Sun, 21 April 2013 00:46 |
|
cpreston
Messages: 160 Registered: July 2012 Location: Oceanside
Karma: 6
|
Senior Member |
|
|
Frank,
We spoke last year about me migrating our phpBB2/mail2forum forum to FUDforum, and you were very helpful. Now I'm finally ready to give it a shot and I'm very glad to see that you're on the job!
I am still running php 5.2.17 because phpBB2 can't run any higher than that. I will be able to upgrade PHP once I migrate this forum to FUDforum.
Here's the doozy: It's a large forum with 10K users and 250K messages.
I downloaded the latest MigrationAssistant.zip, unzipped it into the directory and ran:
php convert.php phpBB2 ../phpBB2
Everything seemed to work fine until it started importing messages, at which point it gave a segmentation fault. When I google about php and seg faults, the suggestion seems to be to upgrade PHP.
Suggestions? TIA for any help.
Other config values in case you're curious:
cPanel Version 11.36.1 (build 5)
Apache version 2.2.23
PHP version 5.2.17
MySQL version 5.0.96-community
Architecture x86_64
Operating system linux
Kernel version 2.6.18-194.32.1.el5
cPanel Pro 1.0 (RC1)
I tried copying the database to another host with a more recent PHP version. (phpBB2 won't work over there, but I can access the database.) Now when I try to do the import I get an error right away during the user import:
?343 ?1366516804?(/home/<user>/FUDforum/include/theme/default/db.inc:104<br />
/home/<user>/public_html/ff/convert.php:328<br />
/home/<user>/public_html/ff/conversionmaps/phpBB2.map:108<br />
/home/<user>/public_html/ff/convert.php:818<br />
) 1062: Duplicate entry '' for key 'fud30_users_i_a'<br />
Query: <br />
Database version: 5.5.30-cll<br />
[Updated on: Sun, 21 April 2013 04:06] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|