Error “unknown system variable ‘names’” after installing SMF

On 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)
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′;



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: