Migrated database from php-fusion ::HELP::

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
User avatar
Elvenelf
Registered User
Posts: 5
Joined: Fri Sep 07, 2007 7:55 pm

Migrated database from php-fusion ::HELP::

Post by Elvenelf » Thu Oct 04, 2007 5:04 pm

Your board's URI: http://www.dclans.com

Version of phpBB2: v2 (latest stable)

Was this a fresh install or a(n) update/upgrade/conversion (please be specific)? Conversion from PHP-Fusion. Passwords there were double md5 encrypted, now having issues with users not logging in cuz they dont really know how to reset their passwords. I would like to send the reset password email to them, looking for a way to reset their passwords automatically and have them re-activate their accounts.

Was this an install through your host? No, i did it myself.

MODs you have installed:EasyMOD, AntiSpam(not working properly, still fixing up installation, something went wrong).

When the problem started: Since day one.


OK, basically what I would like to do is to switch passwords back to single md5 protection... php-fusion had a mod from core code to up the md5 encryption to double... so their password variables looked like... md5(md5($_POST['usr_password'])); like so... and I would like an easy way for my users o log in without having to put them through a password reset process all over again.... is there anything I can do to help em in?
Last edited by Jim_UK on Thu Oct 04, 2007 5:24 pm, edited 1 time in total.
Reason: Moved to Convertors

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: Migrated database from php-fusion ::HELP::

Post by D¡cky » Fri Oct 05, 2007 4:03 am

This should work

Code: Select all

############################################################## 
## MOD Title: Allow login for php-fusion users
## MOD Author: Dicky < dicky@askmaggymae.com >
## MOD Description: Allows converted php-fusion users to log in to the new phpBB board with their smf passwords
## MOD Version: 1.0.0
## MOD date: Oct 4, 2007
## 
## Installation Level: easy
## Installation Time: 3 Minutes 
## Files To Edit: (1) login.php
## Included Files: n/a
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
# 
#-----[ OPEN ]------------------------------------------ 
# 
login.php
# 
#-----[ FIND ]------------------------------------------ 
# Line 86
				{
					message_die(GENERAL_MESSAGE, sprintf($lang['Login_attempts_exceeded'], $board_config['max_login_attempts'], $board_config['login_reset_time']));
				}
# 
#-----[ AFTER, ADD ]------------------------------------
#
			// check if this is a converted user
			// handles php-fusion user passwords
				if( md5($password) !== $row['user_password'] && $row['user_active'] )
				{
					if ( $row['user_password'] == md5(md5($row['user_password'])))
					{
						// this is a converted user. Now make them a phpBB user!
						// take the subbed pass and put a md5 encryption on it and insert it into the database 
						$sql = "UPDATE " . USERS_TABLE . " SET user_password = '" . md5( $HTTP_POST_VARS['password'] ) . "' WHERE user_id = '" . $row['user_id'] . "'";
						if( !$db->sql_query($sql) ) 
						{ 
							message_die(GENERAL_ERROR, 'Password Error:<br />Please contact the board administrator immediately.', '', __LINE__, __FILE__, $sql); 
						}
						// reset $row[user_password]
						$sql = "SELECT user_id, username, user_password, user_active, user_level 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);
						}
						$row = $db->sql_fetchrow($result); 
					}
				}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Have you hugged someone today?

Manifest
Registered User
Posts: 7
Joined: Mon Dec 10, 2007 4:53 am

Re: Migrated database from php-fusion ::HELP::

Post by Manifest » Mon Dec 10, 2007 5:03 am

I've been trying to convert my PHP Fusion to PHPBB and the PHP-Fusion 5.x converter worked somewhat...

The main issue I was having was with passwords, and your above edit didn't work for me. Instead, I modified login.php to check for md5 OR double md5 encryption and proceed as normal - this allowed me to login straight away.

Code: Select all

#-----[ FIND ]------------------------------------------ 
# Line 90
# 	if( md5($password) == $row['user_password'] && $row['user_active'] )
#
#-----[ INLINE, FIND ]------------------------------------------ 
# 	if( md5($password)
#
#-----[ ADD AFTER ]------------------------------------------ 
#  || md5(md5($row['user_password']))
Now, before I make this a permanent conversion i'd like to know if there are any potential problems with my edit or not... I'm an amateur with PHP so would greatly appreciate the clearance of this method by someone in the know. It worked for me, now i'm just trying to get a few 'select' members to see if they can login straight away too.

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: Migrated database from php-fusion ::HELP::

Post by D¡cky » Wed Dec 12, 2007 4:16 am

Your code looks okay. It does basically the same thing as mine except yours doesn't convert the password to single md5 hash.
Have you hugged someone today?

Manifest
Registered User
Posts: 7
Joined: Mon Dec 10, 2007 4:53 am

Re: Migrated database from php-fusion ::HELP::

Post by Manifest » Fri Dec 14, 2007 7:54 am

No - because that didn't work for me.

PARTyZAN
Registered User
Posts: 3
Joined: Wed Jul 30, 2008 12:51 pm

Re: Migrated database from php-fusion ::HELP::

Post by PARTyZAN » Wed Jul 30, 2008 1:02 pm

Would anyone be willing to do a script that automatically converts ALL passwords in database to phpbb compatible ones?

//edit: sorry, I guess I'm to sleepy right now to think straight. I know that I requested something that's impossible to do :(. Can anyone supply me with a solution for phpbb v3 forum?

Any help will be greatly appreciated, since this is the only barrier preventing my migration from php-fusion to phpbb.

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: Migrated database from php-fusion ::HELP::

Post by D¡cky » Wed Jul 30, 2008 3:54 pm

The attached file should work. Unzip and upload to the phpBB3 includes/auth directory
Attachments

[The extension zip has been deactivated and can no longer be displayed.]

Last edited by D¡cky on Wed Jul 30, 2008 7:41 pm, edited 2 times in total.
Reason: Add updated file
Have you hugged someone today?

PARTyZAN
Registered User
Posts: 3
Joined: Wed Jul 30, 2008 12:51 pm

Re: Migrated database from php-fusion ::HELP::

Post by PARTyZAN » Wed Jul 30, 2008 5:05 pm

Thanks for your fast reply. I tried your modified auth_db file and it doesn't work:

Parse error: syntax error, unexpected T_ELSE in /www/phpBB3/includes/auth/auth_db.php on line 144

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: Migrated database from php-fusion ::HELP::

Post by D¡cky » Wed Jul 30, 2008 6:44 pm

Sorry about that. A new file has been uploaded to my previous post.
Have you hugged someone today?

PARTyZAN
Registered User
Posts: 3
Joined: Wed Jul 30, 2008 12:51 pm

Re: Migrated database from php-fusion ::HELP::

Post by PARTyZAN » Wed Jul 30, 2008 7:00 pm

Altho the page now loads like it should, your modification has no effect. I still get the "It was not possible to convert your password when updating this bulletin board’s software." error. I checked the DB, no change was made to my password hash and the "user_pass_convert" field is still set to "1".

//edit: I did it the "foolproof" way. Since I don't have any phpbb2 password hashes I just edited line 144 of auth_db.php to:

Code: Select all

if (md5(md5(($password_old_format))) == $row['user_password'] || md5(md5(utf8_to_cp1252($password_old_format))) == $row['user_password'])
And it works now :). Thanks for help anyway.

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: Migrated database from php-fusion ::HELP::

Post by D¡cky » Wed Jul 30, 2008 7:43 pm

What you did will work. I updated my file anyway.
Have you hugged someone today?

fresheris
Registered User
Posts: 183
Joined: Tue Dec 02, 2008 7:12 pm

Re: Migrated database from php-fusion ::HELP::

Post by fresheris » Thu Dec 04, 2008 5:55 pm

Hi. after conversation i wasnt able to login. but i change my (admin) password manualy using this http://dicky.askmaggymae.com/md5/ and added it to database. now i can login, edit my own replays in a forum but i cant see the admin panel.. i cant admin my forum. can somebody help? thanks.

User avatar
ric323
Former Team Member
Posts: 22908
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Migrated database from php-fusion ::HELP::

Post by ric323 » Thu Dec 04, 2008 9:24 pm

fresheris wrote:Hi. after conversation i wasnt able to login. but i change my (admin) password manualy using this http://dicky.askmaggymae.com/md5/ and added it to database. now i can login, edit my own replays in a forum but i cant see the admin panel.. i cant admin my forum. can somebody help? thanks.
Use the admin toolkit (link in my sig) to promote yourself to an administrator on the phpBB board.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

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: Migrated database from php-fusion ::HELP::

Post by D¡cky » Fri Dec 05, 2008 5:57 am

fresheris wrote:Hi. after conversation i wasnt able to login. but i change my (admin) password manualy using this http://dicky.askmaggymae.com/md5/ and added it to database. now i can login, edit my own replays in a forum but i cant see the admin panel.. i cant admin my forum. can somebody help? thanks.
If you are running on phpBB3, you need to run this query in phpMyAdmin

Code: Select all

UPDATE phpbb_users SET user_type = 3, user_permissions = '' WHERE user_id = xx
Replace the xx in use_id with your user_id and if your table prefix is not phpbb_ replace with your table prefix.
You will need to logout of your board before running the query. You may login after running the query and yu should see the Administration Control Panel link.
Have you hugged someone today?

fresheris
Registered User
Posts: 183
Joined: Tue Dec 02, 2008 7:12 pm

Re: Migrated database from php-fusion ::HELP::

Post by fresheris » Mon Dec 08, 2008 9:52 pm

THANKS! but i just needed to change group_id to 1 and now everything seems to be working.
One more thing, how to fix the searching problem in the new site? thanks.

Locked

Return to “[2.0.x] Convertors”

Who is online

Users browsing this forum: No registered users and 1 guest

cron