Error “unknown system variable ‘names’” after installing SMF
April 14, 2008On servers with MySQL 4.0.x, after a fresh installation of smf using Fantastico, while accessing forum, you might see “unknown system variable ‘names’”
It appears to be caused by this code in SMF:
// Most database systems have not set UTF-8 as their default input charset.
if (isset($db_character_set) && preg_match(’~^\w+$~’, $db_character_set) === 1)
db_query(”
SET NAMES $db_character_set”, __FILE__, __LINE__);
The simple fix for this is to open your Settings.php file and remove the following line from the end of the file: $db_character_set = ‘utf8′;
Tags: smf