-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
3.3.5
Recent changes to the conversion software appear to be buggy. Specifically, changes appear to escape strings in some rows of the phpbb_config table used in conversions as follows:
select * from phpbb_config where config_name like 'convert%';
-----------------{}------------------------------------------------------------------------------------------------------------------------------------------------{}++{}----------
config_name | config_value | is_dynamic |
-----------------{}------------------------------------------------------------------------------------------------------------------------------------------------{}++{}----------
convert_db_server | a:4: {s:4:\"dbms\";s:22:\"phpbb\\db\\driver\\mysqli\";s:6:\"dbhost\";s:9:\"127.0.0.1\";s:6:\"dbport\";s:0:\"\";s:6:\"dbname\";s:10:\"klein-putz\";} | 1 |
convert_db_user | a:2:{s:6:\"dbuser\";s:4:\"root\";s:8:\"dbpasswd\";s:0:\"\";} | 1 |
convert_options | a:2:{s:10:\"forum_path\";s:16:\"../../klein-putz\";s:7:\"refresh\";i:0;} | 1 |
convert_progress | a:3:{s:4:\"step\";s:0:\"\";s:12:\"table_prefix\";s:6:\"phpbb_\";s:3:\"tag\";s:7:\"phpbb20\";} | 1 |
-----------------{}------------------------------------------------------------------------------------------------------------------------------------------------{}++{}----------
As a result, the converter fails after the old database connection information is submitted. When unserialized, a NULL is returned instead of an array.
The database should look more like this:
-----------------{}-----------------------------------------------------------------------------------------------------------------------------{}++{}----------
| config_name | config_value | is_dynamic |
-----------------{}-----------------------------------------------------------------------------------------------------------------------------{}++{}----------
| convert_db_server | a:4:{s:4:"dbms";s:22:"phpbb\db\driver\mysqli";s:6:"dbhost";s:9:"127.0.0.1";s:6:"dbport";s:0:"";s:6:"dbname";s:10:"klein-putz";} | 1 |
| convert_db_user | a:2:{s:6:"dbuser";s:4:"root";s:8:"dbpasswd";s:0:"";} | 1 |
| convert_options | a:2:{s:10:"forum_path";s:16:"../../klein-putz";s:7:"refresh";i:1;} | 1 |
| convert_progress | a:3:{s:4:"step";s:38:"current_table=16&skip_rows=2097987";s:12:"table_prefix";s:6:"phpbb_";s:3:"tag";s:7:"phpbb20";} | 1 |
-----------------{}-----------------------------------------------------------------------------------------------------------------------------{}++{}----------
Yes, phpBB 2 conversions are still happening more than a decade later. I do about half a dozen of these a year for clients.
I'm pretty sure the issue is on line 135 of install/convert/convertor.php:
$src_db->sql_connect($convert->src_dbhost, $convert->src_dbuser, htmlspecialchars_decode($convert->src_dbpasswd, ENT_COMPAT), $convert->src_dbname, $convert->src_dbport, false, true);
The ENT_COMPAT parameter was added.
This flag was added elsewhere in this program since the phpBB 3.3.0 version. All instances should be tested and fixed if contributing to this problem.