[Plugin: PHPBB Single Sign On] Bugfix for numeric database names
-
Hello,
if numeric DB names are used the plugin stops working with the following error:
General Error
SQL ERROR [ mysql4 ]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 ‘6001069003.phpbb3_config WHERE is_dynamic = 1’ at line 2 [1064]
SQL
SELECT config_name, config_value FROM 6001069003.phpbb3_config WHERE is_dynamic = 1
BACKTRACE
FILE: includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()FILE: includes/cache.php
LINE: 37
CALL: dbal_mysql->sql_query()FILE: common.php(76) : eval()’d code
LINE: 4206
CALL: cache->obtain_config()FILE: common.php
LINE: 76
CALL: eval()FILE: index.php
LINE: 20
CALL: include(‘common.php’)To fix this, line 50 of common.php must be changed from
//suprimme le conflit de $table_prefix $include_common_contents = str_replace('$table_prefix','$dbname.".".$table_prefix2',$include_common_contents);
to
//suprimme le conflit de $table_prefix $include_common_contents = str_replace('$table_prefix','"BACKTICK".$dbname."BACKTICK.".$table_prefix2',$include_common_contents);
The solution is quoting the DB name using backticks.
Because I don’t know how to write down backtics here (they are interpreted as CODE), please replace in the code listing BACKTICK with a backtick character `
- The topic ‘[Plugin: PHPBB Single Sign On] Bugfix for numeric database names’ is closed to new replies.