1 (edited by chacmool 2004-01-02 16:42)

Topic: Converter: PhpBB2 -> PunBB1.1 v2.0b3

I'm done with the converter now!

I've just tested it localy with Mako's dump... so there might be bugs and evil things left! So, if you want to try this, look through the "new" forum and check so there is no errors. I don't want to make any "make it right again"-converters if something goes wrong, and I don't want people to be angry at me when they type in the wrong info and all their posts are gone...

Please BACKUP your database before using the converter!

Note1: Version 2.0 must be located in a directory in your PunBB-directory. It uses PunBB's database-class and style.

Note2: Versions above 2.1 now includes PhpNuke-conversion.

Download the converter here: punbb.org/downloads.php

Screenshot v2:
http://www.etek.chalmers.se/~e0mool/punbb/files/PhpBB_conv2.jpg

Screenshot v1:
http://www.etek.chalmers.se/~e0mool/punbb/pics/Converter.jpg

2

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

I've put this before chacmool already and he doesn't know the problem, maybe one of you other hackers know. When I try to run the converter without truncating the tables, it gives me this error:

Page: _categories (1)

Converting categories...
General Discussion (1)

Error:
PunBB: Unable to save to table: categories (Go back)

MySQL error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'id #3categories (id, cat_name, position) VALUES( '1',

When I check the box to truncate them, it gives me this error:

Page: _start (0)

Clearing tables...

Error:
Unable to truncate table.
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'id #3categories' at line 1 (Go back)

MySQL error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'id #3categories' at line 1

I have gone to the _start and _categories pages to see if I could find something wrong, but I found nothing.

If it makes any difference, I am currently running MySQL 4.0.15

"You start coding. I'll go find out what they want." - Computer Analyst to Programmer

3

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Ok I downloaded the new version of his converter (I was using a beta/non-public version), but I still got some errors. Here they are:

Truncate checked:
Page: _start (0)

Clearing tables...

Error:
Unable to truncate table. (Go back)

MySQL error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'id #3categories' at line 1

File: C:\minixampp\htdocs\cnvrtr\_start.php
Line: 24

reset

Truncate not checked:
Page: _categories (1)

Converting categories...
General Discussion (1)

Error:
PunBB: Unable to save to table: categories (Go back)

MySQL error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'id #3categories (id, cat_name, disp_position) VALUES( '

File: C:\minixampp\htdocs\cnvrtr\_categories.php
Line: 15

reset

Please somebody help!

"You start coding. I'll go find out what they want." - Computer Analyst to Programmer

4 (edited by chacmool 2004-01-04 10:23)

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Error:
Unable to truncate table. (Go back)

MySQL error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'id #3categories' at line 1

File: C:\minixampp\htdocs\cnvrtr\_start.php
Line: 24

Well, this is all wrong... the querys there should look like this:

'TRUNCATE TABLE punbb_posts'

Seems to be some 'old' querys in the array somehow, try adding a $queries = null; before line five and see if it helps.

Edit: Try this start-file instead: _start.zip

5 (edited by Mako 2004-01-04 18:49)

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Page: _start (0)

Clearing tables...

Error:
Unable to truncate table.

Mysql query:
TRUNCATE TABLE Resource id #3categories (Go back)

MySQL error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'id #3categories' at line 1

File: C:\minixampp\htdocs\cnvrtr\_start.php
Line: 22

reset

I think I see the problem. $SESSION['pun'] is coming up as a Resource ID (#3 to be exact). Damn it's been a long time since I've gotten errors like that. I'm going to try to replace $SESSION['pun'] with 'punbb_' since this is just for my comptuer and that's what I am using.

Edit: I didn't notice that $SESSION[pun] was for the database, and $SESSION[pun_prefix] was for the prefix of the tables. I feel dumb now.

Edit 2: Ok now I'm lost again...

"You start coding. I'll go find out what they want." - Computer Analyst to Programmer

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Yes, it's a problem with the sessions as I suspected.

$SESSION['pun'] should be equals to "database.prefix"... dont know why it's getting "Resource id #3" sad

7

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Hello,

chacmool, could you give some detail on your PHP version and configuration (php.ini) ?

I think you use and older and more permissive one, which allows you to edit the superglobals variables ($_SESSION['foo'] = 'bar')...

8

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Ok I will replace the $SESSION variables with what they are supposed to hold and see if that changes anything. I hope it does because I am sick of phpBB!

"You start coding. I'll go find out what they want." - Computer Analyst to Programmer

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

arnaudgreffier wrote:

Hello,

chacmool, could you give some detail on your PHP version and configuration (php.ini) ?

I think you use and older and more permissive one, which allows you to edit the superglobals variables ($_SESSION['foo'] = 'bar')...

Ahh, that could probably be the problem Mako haves!

I'll look at it later today when I'm home. Thanx!

10 (edited by chacmool 2004-01-05 11:23)

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Mako wrote:

Ok I will replace the $SESSION variables with what they are supposed to hold and see if that changes anything. I hope it does because I am sick of phpBB!

You cold print out the session-variable to see how's it looking:

echo "<pre>";
print_r($_SESSION);
echo "</pre>";

11

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

FOUND ! TROUVÉ !

Okay, I looked deeply in the code, and with a lot of print_r I found that : <var>$_SESSION['pun']</var> is the only problematic variable.

And it comes from the line 50 of index.php, <var>$pun</var> and <var>$_SESSION['pun']</var> have the same name.

Strangely, the two variables share the same name even with register_globals set to off...

12

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Ok I replaced all of the $SESSION["pun"] with punbb.punbb_ and it worked! Now the only problem I have is this parse error with the date() function. It's saying that windows does not support dates earlier than 1970. Wah!

"You start coding. I'll go find out what they want." - Computer Analyst to Programmer

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Ohh, yes. Thats true.

I'll look at it right away. If you want to "solve" the problem now when it's already converted you can post a message and then delete it right away I think.

I think the problem is that when there's no posts, the time is saved as: "0" instead of NULL.

14 (edited by chacmool 2004-01-05 20:50)

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

I've fixed the variable/session problem now. Also fixed the querys where I forgot to include addslashes at some places...

15

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Coolness. Did you upload the new one on PunRes?

"You start coding. I'll go find out what they want." - Computer Analyst to Programmer

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Mako wrote:

Coolness. Did you upload the new one on PunRes?

Yepp! Beta2

17

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

my webhostingcompany only allows me to have one database. sad i whould like to convert my phpbb forum to a punbb but as my phpbb forum is on another server that is impossible?

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Nasso wrote:

my webhostingcompany only allows me to have one database. sad i whould like to convert my phpbb forum to a punbb but as my phpbb forum is on another server that is impossible?

Can't you transfer the phpbb-database from the server to your server?

19

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

i can istall punbb on my old server, the one with phpbb, and then convert using your tool... but how do i move the ounbb database after that? can i just download the database as a file and upload it on the new server? sorry.. dont know much about databases hmm im just a gameprogrammer wink

20

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

my webhotell only allows me to have one mySQL database, there is no way to use this then?

i got a phpbb2 forum using that database but want to convert to punbb..

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

seletah wrote:

my webhotell only allows me to have one mySQL database, there is no way to use this then?

i got a phpbb2 forum using that database but want to convert to punbb..

That should be no problem, just enter the same database in both fields.

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

is there also a converter from PunBB to phpBB?
I would like to find a way to do this.

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

basalphenaar wrote:

is there also a converter from PunBB to phpBB?
I would like to find a way to do this.

No, there's not. I think the only way is to do the converter yourself.

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

Chacmool wrote:
basalphenaar wrote:

is there also a converter from PunBB to phpBB?
I would like to find a way to do this.

No, there's not. I think the only way is to do the converter yourself.

but i'm not that experienced with php sad

Re: Converter: PhpBB2 -> PunBB1.1 v2.0b3

I'm back at punBB, i used phpBB for a while, but i didn't like it so much. I converted al the phpBB messages back to punBB,  everything went well but the only problem was that all the messages from guests where gone. I don't think i can get them back, but i just wanted to say this so you could fix this for the next version. (maybe this bug is already reported, i don't know wink )