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!

I just ran the converter using this map and it worked great for the most part. As far as I can tell right now, the only problems are with the attachments and smilies. Apparently I can't post a link to the attachment mod I used, but if you search "phpbb2 attachment mod by acyd burn" you should be able to find it. I know this isn't part of a standard phpBB2 install, but is there any way you guys could make it work? I'm sure I'm not the only one who would find it useful. It was a very popular mod back in the day.

The smilies themselves imported just fine, but they don't display in any of the posts imported from phpBB2. It looks like the conversion script replaced each smilie with a hardcoded path to the image, which would be fine except I had uploaded some custom smilies to the forum with different file names from the default smilies and the script has used the default file names.

Any help on these issues would be greatly appreciated. We've been stuck on phpBB2 because our community insists on having a mailing list interface, and the mail2forum add-on for phpBB2 is the only free and open source solution I had been able to find. I was really excited when I discovered that FUDforum is a modern, currently maintained forum software with the mailing list built in! I am really hoping we can get it to work for our needs.

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?

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.

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.

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?

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.

New problem - polls. The poll topics and polls themselves transferred but none of the votes converted - they all say zero votes.

Can you think of a way I can fix that after-the-fact? Assuming you will fix the converter so polls transfer properly, I can't do a selective restore, so I wouldn't be able to re-convert to a temporary FUDforum site, dump the poll topics, and re-load the poll topics on the live FUDforum site, right? Or can I?

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:

The "MySQL server has gone away" error is an indication that your server/ database is probably overloaded and cannot process the request. This is, unfortunately, not a FUDforum problem and we cannot help you with it.

Alright, moving it to a beefier box got rid of that error. I still have the others, and I think I know what's causing them. I decided to start a different thread because the errors are specific to mail2forum.

I'm continuing to work on this, and I'm oh so close. It's importing 99% of the messages, but 1% are silently failing. So I have a few questions:

- Any idea why a small portion of the messages would not import?
- What happens if I run the import again? Does it look to see which messages are/aren't imported and import the ones that arent?
- I ask the above question in hopes that I could figure out which messages aren't working, fix them somehow, then rerun the script so they import properly.

I had my team look at it. The messages that don't import appear to be messages in phpBB that don't have an associated thread. I'm not sure how those messages got created in the first place, or how you even have a message that isn't attached to a thread, but the mystery appears to be solved!

Unless you tell me it's really easy for you to make that happen, I think I'm just going to let it go. I just wanted an explanation. Not sure what the value would be of messages that got put into an orphaned messages thread.

I was running php 5.4.20 and was getting these errors again. I downreved to the next lowest version (5.3.27) and the import worked. However, that's weird that it wouldn't run with the current non-experimental PHP version. 5.3.27 is deprecated according to cpanel.