add this code to the connection file just before that line to define the finction if it does not exist:
if (!function_exists('mysql_set_charset')) {
function mysql_set_charset($charset, $link_identifier = null)
{
if ($link_identifier == null) {
return mysql_query('SET NAMES "'.$charset.'"');
} else {
return mysql_query('SET NAMES "'.$charset.'"', $link_identifier);
}
}
}