[SUPPORT] PunBB to phpBB convertor

This is an archive of the phpBB 2.0.x convertors forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
StudioZ
Registered User
Posts: 3
Joined: Mon Jan 15, 2007 10:18 pm

Post by StudioZ » Mon Jan 15, 2007 10:29 pm

Using: PunBB 1.1.x convertor Version 1.0.3
I am trying to convert my punBB 1.2.13 to phpbb2 (2.0.22).
For some unknown reason I can't convert the users :roll:

Here's the type of error I get and... for each user:

Code: Select all

Couldn't insert user data
1064: 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 ' 2, '-5', 1, 'english', 'd M Y h:i a', 0, 0, 0, NULL, 1, 1, 0, 1, 1, 1, 1, 1, 0,' at line 2

INSERT IGNORE INTO phpbb_users (user_id, user_active, username, user_password, user_session_time, user_session_page, user_lastvisit, user_regdate, user_level, user_posts, user_timezone, user_style, user_lang, user_dateformat, user_new_privmsg, user_unread_privmsg, user_last_privmsg, user_emailtime, user_viewemail, user_attachsig, user_allowhtml, user_allowbbcode, user_allowsmile, user_allowavatar, user_allow_pm, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_rank, user_avatar, user_avatar_type, user_email, user_icq, user_website, user_from, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_msnm, user_occ, user_interests, user_actkey, user_newpasswd)
VALUES (2, 1, 'Admin', ' ... etc. etc. ...



Here's the tables' structures I have:
(Please excuse me for this long message)

Code: Select all

CREATE TABLE phpbb_users (
  user_id mediumint(8) NOT NULL default '0',
  user_active tinyint(1) default '1',
  username varchar(25) NOT NULL default '',
  user_password varchar(32) NOT NULL default '',
  user_session_time int(11) NOT NULL default '0',
  user_session_page smallint(5) NOT NULL default '0',
  user_lastvisit int(11) NOT NULL default '0',
  user_regdate int(11) NOT NULL default '0',
  user_level tinyint(4) default '0',
  user_posts mediumint(8) unsigned NOT NULL default '0',
  user_timezone decimal(5,2) NOT NULL default '0.00',
  user_style tinyint(4) default NULL,
  user_lang varchar(255) default NULL,
  user_dateformat varchar(14) NOT NULL default 'd M Y H:i',
  user_new_privmsg smallint(5) unsigned NOT NULL default '0',
  user_unread_privmsg smallint(5) unsigned NOT NULL default '0',
  user_last_privmsg int(11) NOT NULL default '0',
  user_login_tries smallint(5) unsigned NOT NULL default '0',
  user_last_login_try int(11) NOT NULL default '0',
  user_emailtime int(11) default NULL,
  user_viewemail tinyint(1) default NULL,
  user_attachsig tinyint(1) default NULL,
  user_allowhtml tinyint(1) default '1',
  user_allowbbcode tinyint(1) default '1',
  user_allowsmile tinyint(1) default '1',
  user_allowavatar tinyint(1) NOT NULL default '1',
  user_allow_pm tinyint(1) NOT NULL default '1',
  user_allow_viewonline tinyint(1) NOT NULL default '1',
  user_notify tinyint(1) NOT NULL default '1',
  user_notify_pm tinyint(1) NOT NULL default '0',
  user_popup_pm tinyint(1) NOT NULL default '0',
  user_rank int(11) default '0',
  user_avatar varchar(100) default NULL,
  user_avatar_type tinyint(4) NOT NULL default '0',
  user_email varchar(255) default NULL,
  user_icq varchar(15) default NULL,
  user_website varchar(100) default NULL,
  user_from varchar(100) default NULL,
  user_sig text,
  user_sig_bbcode_uid varchar(10) default NULL,
  user_aim varchar(255) default NULL,
  user_yim varchar(255) default NULL,
  user_msnm varchar(255) default NULL,
  user_occ varchar(100) default NULL,
  user_interests varchar(255) default NULL,
  user_actkey varchar(32) default NULL,
  user_newpasswd varchar(32) default NULL,
  PRIMARY KEY  (user_id),
  KEY user_session_time (user_session_time)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE punbb_users (
  id int(10) unsigned NOT NULL auto_increment,
  group_id int(10) unsigned NOT NULL default '4',
  username varchar(200) NOT NULL default '',
  `password` varchar(40) NOT NULL default '',
  email varchar(50) NOT NULL default '',
  title varchar(50) default NULL,
  realname varchar(40) default NULL,
  url varchar(100) default NULL,
  jabber varchar(75) default NULL,
  icq varchar(12) default NULL,
  msn varchar(50) default NULL,
  aim varchar(30) default NULL,
  yahoo varchar(30) default NULL,
  location varchar(30) default NULL,
  use_avatar tinyint(1) NOT NULL default '0',
  signature text,
  disp_topics tinyint(3) unsigned default NULL,
  disp_posts tinyint(3) unsigned default NULL,
  email_setting tinyint(1) NOT NULL default '1',
  save_pass tinyint(1) NOT NULL default '1',
  notify_with_post tinyint(1) NOT NULL default '0',
  show_smilies tinyint(1) NOT NULL default '1',
  show_img tinyint(1) NOT NULL default '1',
  show_img_sig tinyint(1) NOT NULL default '1',
  show_avatars tinyint(1) NOT NULL default '1',
  show_sig tinyint(1) NOT NULL default '1',
  timezone float NOT NULL default '0',
  language varchar(25) NOT NULL default 'English',
  style varchar(25) NOT NULL default 'Oxygen',
  num_posts int(10) unsigned NOT NULL default '0',
  last_post int(10) unsigned default NULL,
  registered int(10) unsigned NOT NULL default '0',
  registration_ip varchar(15) NOT NULL default '0.0.0.0',
  last_visit int(10) unsigned NOT NULL default '0',
  admin_note varchar(30) default NULL,
  activate_string varchar(50) default NULL,
  activate_key varchar(8) default NULL,
  PRIMARY KEY  (id),
  KEY users_registered_idx (registered),
  KEY users_username_idx (username(8))
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
Is there something I overlooked ?
Thank you for your help :oops:

Yves

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky » Tue Jan 16, 2007 12:59 am

StudioZ wrote: Using: PunBB 1.1.x convertor Version 1.0.3
I am trying to convert my punBB 1.2.13 to phpbb2 (2.0.22).
For some unknown reason I can't convert the users :roll:

Is there something I overlooked ?
Thank you for your help :oops:

Yves

First, I would try the PunBB 1.2.5 convertor which is linked in the first post of this topic.
Have you hugged someone today?

StudioZ
Registered User
Posts: 3
Joined: Mon Jan 15, 2007 10:18 pm

Post by StudioZ » Tue Jan 16, 2007 4:06 am

D¡cky wrote: First, I would try the PunBB 1.2.5 convertor which is linked in the first post of this topic.

Thank you D¡cky :wink:
Was not sure if it was the good convertor files for my version
but... I will give it a try...

Thanks for your help 8)

Yves

StudioZ
Registered User
Posts: 3
Joined: Mon Jan 15, 2007 10:18 pm

Post by StudioZ » Tue Jan 16, 2007 4:18 am

It did the trick ! :D :D :D
Yééééé !!!!! :) :D 8)

All my gratitude for this convertor 8)

Yves

C4
Registered User
Posts: 80
Joined: Thu Jun 03, 2004 10:45 pm
Contact:

Post by C4 » Wed Jan 24, 2007 7:47 pm

I used this and now I can't login on phpbb :S

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky » Wed Jan 24, 2007 11:27 pm

C4 wrote: I used this and now I can't login on phpbb :S

You can't login because the password encryptions are different. You can use the instructins that are included with the convertor to modify login.php so the passwords will work, or else you can use the "I forgot my password" link.
Have you hugged someone today?

mdfh
Registered User
Posts: 4
Joined: Tue Oct 24, 2006 4:52 pm

Post by mdfh » Wed Feb 07, 2007 5:39 pm

hi
is it possible to convert the data of punbb's cash mod at the same time?
it lays in punbb_users --> cm_cash.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky » Thu Feb 08, 2007 4:03 am

It may be possible if you install Xore's Cash MOD. I don't have the time to do it right now, though.
Have you hugged someone today?

C4
Registered User
Posts: 80
Joined: Thu Jun 03, 2004 10:45 pm
Contact:

Post by C4 » Mon Mar 05, 2007 2:33 am

Huh, it seems like none of the members were converted at all! everything else worked fine though

rootuid
Registered User
Posts: 14
Joined: Sun Apr 01, 2007 1:48 am

Re: [SUPPORT] PunBB to phpBB convertor

Post by rootuid » Sun Apr 01, 2007 1:56 am

see below.
Last edited by rootuid on Sat Jun 09, 2007 11:56 am, edited 1 time in total.

rootuid
Registered User
Posts: 14
Joined: Sun Apr 01, 2007 1:48 am

Re: [SUPPORT] PunBB to phpBB convertor

Post by rootuid » Sat Jun 09, 2007 11:34 am

Hi,
I'm using punBB 1.2.5 To PhpBB 2.0.x Converter to convert a punBB 1.2.15 installation to phpBB 2.0.22. I've correctly specified the punBB prefix in pun2phpBB\conf.php. I then attempt to run http://localhost/phpBB2/pun2phpBB/index.php and execute step 1, which fails:
All phpBB ranks are deleted.

Couldn't find prefix_ranks
1146: Table 'phpbb.prefix_ranks' doesn't exist

SELECT * FROM prefix_ranks

Couldn't get ranks from ranks table.
1146: Table 'phpbb.prefix_ranks' doesn't exist

SELECT * FROM prefix_ranks
Number of ranks to convert : .
Conversion of Ranks converted successfuly.

Couldn't find prefix_config
1146: Table 'phpbb.prefix_config' doesn't exist

SELECT * FROM prefix_config

Unable to delete guest user into members table
1146: Table 'phpbb.prefix_users' doesn't exist
None of these tables phpbb.xxxx_xxxx exists which appears to be why the conversion is failing. Have the tables been renamed since the last version of this script? My punbb database is seperate to my phpBB database, I'll try importing the punbb tables to the phpbb tables and see if that solves it. If someone could point me in the right direction that would be great. Thanks.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [SUPPORT] PunBB to phpBB convertor

Post by D¡cky » Sat Jun 09, 2007 4:25 pm

The PunBB tables do have to be in the phpBB database. Importing the PunBB tables into the phpBB database should solve your problem.
Have you hugged someone today?

rootuid
Registered User
Posts: 14
Joined: Sun Apr 01, 2007 1:48 am

Re: [SUPPORT] PunBB to phpBB convertor

Post by rootuid » Wed Jun 13, 2007 1:21 pm

Indeed, Many thanks.

ClintH
Registered User
Posts: 3
Joined: Mon Jul 02, 2007 7:01 pm

Re: [SUPPORT] PunBB to phpBB convertor

Post by ClintH » Mon Jul 02, 2007 7:23 pm

Okay, I've used this converter [version 2.0 beta 0.1.2 for reference] with PunBB, 1.2.<unknown> to phpBB 2.0.22 and then upgraded to phpBB 3.0.RC2, and the original code worked with a few modifications, so there's no need for users to reset their password.
With both pieces of code that were pasted, some things needed to be changed for it to work in phpBB 3.0.

Here's the code that I've tested and recommend for users of phpBB 3.0 ONLY!
FIND IN <phpbb directory>/includes/auth.php
it starts on line 732

Code: Select all

	/**
	* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
	*/
	function login($username, $password, $autologin = false, $viewonline = 1, $admin = 0)
	{
		global $config, $db, $user, $phpbb_root_path, $phpEx;
AFTER THAT, paste this

Code: Select all

	//*** start punnbb to phpbb password converter ***
	//this extra bit of code checks if the pass is from punbb then
	//updates the password to something phpbb would understand.  There
	//are other ways to do this but i believe that this requires the least
	//amount of editing (and understanding) of phpbbs original code. ;')

	$sql = "SELECT user_id, username, user_password   FROM " . USERS_TABLE . " WHERE username = '" . str_replace("\\'", "''", $username) . "'";
	if ( !($result = $db->sql_query($sql)) ) 
	{ 
		message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql); 
	}
   
	//users exists so lets grab their info
	if($row = $db->sql_fetchrow($result))
	{
		//if a sha1 encryption is equal to the pass in the database then its left over from punbb
		//also its only 32 chars long since they were truncated in the dump
		if ( substr( sha1( $HTTP_POST_VARS['password'] ), 0, 32) == substr( $row['user_password'], 0, 32) )
		{
			//take the subbed pass and put a md5 encryption on it and insert it into the database
			$sql = "UPDATE phpbb_users SET user_password = '" . md5( $HTTP_POST_VARS['password'] ) . "' WHERE user_id = '" . $row['user_id'] . "'";
			if ( !($result = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, 'Password Error:<br />Please contact your board administrator immediately.', '', __LINE__, __FILE__, $sql);
			}
		}
	}
	//we are updating the database password (if neccessary) before phpbb has a
	//chance to check it.  the rest of the code should just run as if normally.
	//coded by: sporkit @ www.sporkit.com © 2005
	//*** end punnbb to phpbb password converter ***
I'd like to thank Dicky for the converter, sporkit150 for the code above, Dicky for the modification that I modified, and the phpBB team for the wonderful forum system [3.0 is a much, much, needed improvement].


Clint

Ketchup
Registered User
Posts: 1
Joined: Wed Aug 01, 2007 3:10 pm

Re: [SUPPORT] PunBB to phpBB convertor

Post by Ketchup » Wed Aug 01, 2007 3:12 pm

Hello!

is there a new convertor for version 1.2.9 of punBB ???

thx for the info!

Ketchup

Locked

Return to “[2.0.x] Convertors”

Who is online

Users browsing this forum: No registered users and 2 guests

cron