Testing
and Test¡ng
are both allowed in vB, but not in phpBB as they both produce the same "clean" string when run through utf8_clean_string(). There should be a list of colliding usernames below the "Colliding usernames were found..." message. It should be along the lines of "some_user is the clean username for:".$db->sql_query($drop_sql);
on line 1831 in install/convertors/functions_vb30.php then run the convertor again. If it's still not listing the usernames as indicated above (which it definitely should), then run this query:
Code: Select all
SELECT username_clean
FROM phpbb_userconv
GROUP BY username_clean
HAVING COUNT(user_id) > 1;
Code: Select all
Ok, I tried //$db->sql_query($drop_sql);
and
<!-- $db->sql_query($drop_sql); -->
Code: Select all
CODE: SELECT ALL
SELECT username_clean
FROM phpbb_userconv
GROUP BY username_clean
HAVING COUNT(user_id) > 1;
The first one is the proper method. Commenting it out just ensures that database table where the info about colliding usernames is stored isn't dropped so that you can run the query on it afterwards.Sulla wrote:Neither made any difference? Is that the correct way to comment the line out? Either of them?
This is usually done in whichever database administration tool you have installed. This is usually phpMyAdmin. See: Executing SQL Queries in phpMyAdmin. Or simply save this as a file called collisions.php and put it in the phpBB board root directory. Run it and post the output.Sulla wrote:How do I run the query that you suggested?
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$sql = 'SELECT username_clean
FROM ' . $table_prefix . 'userconv
GROUP BY username_clean
HAVING COUNT(user_id) > 1';
$result = $db->sql_query($sql);
$colliding_names = array();
while ($row = $db->sql_fetchrow($result))
{
$colliding_names[] = $row['username_clean'];
}
$db->sql_freeresult($result);
// there was at least one collision, the admin will have to solve it before conversion can continue
if (sizeof($colliding_names))
{
$sql = 'SELECT user_id, username_clean
FROM ' . $table_prefix . 'userconv
WHERE ' . $db->sql_in_set('username_clean', $colliding_names);
$result = $db->sql_query($sql);
unset($colliding_names);
$colliding_user_ids = array();
while ($row = $db->sql_fetchrow($result))
{
$colliding_user_ids[(int) $row['user_id']] = $row['username_clean'];
}
$db->sql_freeresult($result);
$sql = 'SELECT username, userid, posts
FROM ' . $convert->src_table_prefix . 'user
WHERE ' . $src_db->sql_in_set('userid', array_keys($colliding_user_ids));
$result = $src_db->sql_query($sql);
$colliding_users = array();
while ($row = $db->sql_fetchrow($result))
{
$row['userid'] = (int) $row['userid'];
if (isset($colliding_user_ids[$row['userid']]))
{
$colliding_users[$colliding_user_ids[$row['userid']]][] = $row;
}
}
$db->sql_freeresult($result);
unset($colliding_user_ids);
print_r($colliding_users);
}
exit_handler();
?>
No, those should be fine.Sulla wrote:On Usernames, would it pick up CSO_Fubar and CSO_Aussie as being the same as there are an awful lot with the CSO_ in front of the name.
Code: Select all
General Error
SQL ERROR [ mysqli ]
Table 'stratek5_php3forum.USERCONV_TABLE' doesn't exist [1146]
An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
Code: Select all
user_id Ascending
username_clean
1
sulla
2
sk_vonsoden
4
ice
5
cso_gunner
6
cso_soolla
7
cso_greypanther
8
cso_pixter
9
cso_redimpz
10
cso_axrael
11
cso prima donna
12
cso_toml
13
beeblebrox
14
vonb
15
melsang
16
cso_2milesniper
17
cso_fergusfrog
19
cso_iceman
20
bin-45
21
cso_jim_mcneil
22
cso_sbufkle
23
cso_vb
24
cso_jericho
25
cso_fubar
26
cso_aussie
27
cso_tokarev
28
jjvan
29
cso_geyer
30
cso_jacripper
31
cso_darter2
32
cso_janneb
General Error
SQL ERROR [ mysqli ]
Table 'stratek5_php3forum.phpbb_userconv' doesn't exist [1146]
The SQL Query gives the following:
An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
It makes no sense, must be something really dopey I am doing! Hope importing the posts is easier than this lol#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 'CODE: SELECT ALL SELECT username_clean FROM phpbb_userconv GROUP BY ' at line 1
CODE: SELECT ALL
isn't a part of the query, so remove that. I had removed it prior to running the query. Any ideas at all users would be so welcome mate.CODE: SELECT ALL isn't a part of the query, so remove that.
phpbb_
). Seems like a bug in the converter, although that should have no effect in this particular case.Code: Select all
SELECT username_clean
FROM userconv
GROUP BY username_clean
HAVING COUNT(user_id) > 1;
Code: Select all
SELECT username_clean
FROM userconv
GROUP BY username_clean
HAVING COUNT(user_id) > 1;
Code: Select all
SELECT username_clean
FROM userconv
GROUP BY username_clean
HAVING COUNT( user_id ) >1
LIMIT 0 , 30
Start row: Number of rows: Headers every rows
- Options
Partial texts
Full texts
Show binary contents
Show BLOB contents
Show binary contents as HEXHide browser transformation Geometry
Well Known Text
Well Known Binary
username_clean
aiden
david
hoth