conversion from 2.0, duplicate usernames

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Scam Warning
Sulla
Registered User
Posts: 48
Joined: Sat Feb 08, 2014 7:45 am

Re: conversion from 2.0, duplicate usernames

Post by Sulla »

Support
Full support will be provided for the current stable release of phpBB3, free of charge. This includes:
  • installation
    configuration
    technical questions
    problems relating to potential bugs in the software
    updating from Release Candidate (RC) versions to the latest stable version
    converting from phpBB 2.0.x to phpBB3
    converting from other discussion board software to phpBB3 (please see the Convertors Forum)
    We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.
Thanks - Shaun
-------------------------------------------------------------------------------------------------------
Nec amicus officium nec hostis iniuriam mihi intulit, quo in toto non reddidi. - Sulla
-------------------------------------------------------------------------------------------------------
No Better Friend, No Worse Enemy - Lucius Cornelius Sulla Felix
http://www.closecombat.org
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53639
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: conversion from 2.0, duplicate usernames

Post by Brf »

Brf wrote:You need to go into your VB board and fix the names.
It cannot be converted until you remove the duplicates in your VB board.
Sulla
Registered User
Posts: 48
Joined: Sat Feb 08, 2014 7:45 am

Re: conversion from 2.0, duplicate usernames

Post by Sulla »

Hia Brf/Pro,

Pro got the databases working great, have been having fun learning the phpbb backend/admin.

OT/ I have a question. I have been trying to change colours on one of the styles, chose prosilver as it looked the most sensible to try.

However, now I am stuck and cannot get them back to the old prosilver, have deleted files manually via ftp then re-uploaded them. I have purged styles, refreshed styles. Went into cache and deleted everything there.

Nothing, I am stuck with the changes. Now I know there must be something I am missing, could you point me in the right direction.

Oh, tickbox for store in file system was ticked. Got me totally stumped.

Any help v v welcome! Man not easy to customise [yet lol]

Rgds - Shaun
-------------------------------------------------------------------------------------------------------
Nec amicus officium nec hostis iniuriam mihi intulit, quo in toto non reddidi. - Sulla
-------------------------------------------------------------------------------------------------------
No Better Friend, No Worse Enemy - Lucius Cornelius Sulla Felix
http://www.closecombat.org
Sulla
Registered User
Posts: 48
Joined: Sat Feb 08, 2014 7:45 am

Re: conversion from 2.0, duplicate usernames HELP .......

Post by Sulla »

Hia Pro,

I was messing around with automod and somehow the posts on the forum vanished, showed they were there, but hit any link and no post showed up. I uninstaled the mods, deleted the old mod table and dropped a clean one in, all to no avail.

I renamed the original conversion _csoforums and created a new conversion at csoforums.

The conversion script ran fine, although I now cannot rebuild the search indexes. It gives me the Internal Server Error error at bottom of this page when rying to rebuild search indexes.

After the conversion below, I am left with a database that is 378.06 MB and the phpbb says its 170.82 MiB. Do I need to move the php tables to a new database? If so how?

Also, not sure how this has happened as they are totally different tables, but the new conversion has used the modified templates, not the standard prosilver?

Is there any way of getting the new conversion, indexed for searching, back to vanilla pro silver and seperate the databases? The site is getting to a point where I need to get it live, but am totally messed up at the moment.

Templates are coming along well, am learning a lot, although much trial and error [on an empty forum lol]

Oh, how do I get the DB seperate from the original DB? create empty DB and copy php tables over to that? Would that not mean changing the settings to point to new table?

I am so sorry to be a pain mate, after I got blank pages after automod, was at a bit of a loss what to do.

Any help hugely welcomed! :shock:

Cheers - Shaun

New:
http://www.closecombat.org/csoforums/adm/

Old:
http://www.closecombat.org/_csoforums/adm/

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
-------------------------------------------------------------------------------------------------------
Nec amicus officium nec hostis iniuriam mihi intulit, quo in toto non reddidi. - Sulla
-------------------------------------------------------------------------------------------------------
No Better Friend, No Worse Enemy - Lucius Cornelius Sulla Felix
http://www.closecombat.org
nrivers
Registered User
Posts: 1
Joined: Tue Jun 17, 2014 5:16 pm

Re: conversion from 2.0, duplicate usernames

Post by nrivers »

I created a solution that goes to the old database, grabs all duplicates, and appends a number to the end of it. This will allow you to convert properly without having to manually update each database entry.

Code: Select all

<?php
	// connect your database
    $dbhost = 'YOURHOST';
    $dbuser = 'YOURUSERNAME';
    $dbpass = '';

    $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
    $dbname = 'YOURDBNAME';
    mysql_select_db($dbname);

	// Update the table to match your prefix.
	$sql = 'SELECT username
		FROM nuke_bbusers
		GROUP BY username
		HAVING COUNT(*) > 1';
	$result = mysql_query($sql);

	$colliding_names = array();
	while ($row = mysql_fetch_array($result))
	{
		$colliding_names[] = $row['username'];
	}

	foreach ($colliding_names as $val) {
		// Update the table to match your prefix.
		$sql = "SELECT username, user_id FROM nuke_bbusers WHERE username = '$val'";
	    $rs = mysql_query($sql);

		$count = 0;
	    while($row = mysql_fetch_array($rs)) {
			$count++;
			$new_username = $val."_".$count;
			$rowid = $row['user_id'];
			$sql = "UPDATE nuke_bbusers SET username='$new_username' WHERE username='$val' AND user_id='$rowid'";
			mysql_query($sql);
		}
	}
?>
If you run this on your server, it will go through and do it all for you.

Return to “[3.0.x] Convertors”