Hi, I looked once again through the mysql docs, and figured that one should modify only sapphire/core/model/MySQLDatabase.php (if the site has been already installed) adding just one mysql_query which is the replacement for the 3 mentioned above.
Look at the lines starting with 38. The code should go like that:
public function __construct($parameters) {
$this->dbConn = mysql_connect($parameters['server'], $parameters['username'], $parameters['password']);
$this->active = mysql_select_db($parameters['database'], $this->dbConn);
$this->database = $parameters['database'];
if(!$this->dbConn) {
$this->databaseError("Couldn't connect to MySQL database");
}
mysql_query ("SET CHARACTER SET utf8");
parent::__construct();
}
Are you using a shared hosting as well? If you need to install, you should create an empty database first, then go to phpmyadmin (or whatever you use) and manually set the db properties (encoding). Make sure you do that on an empty database, because when it already has data you won't be able to modify it.
Then modify your install.php in the function starting with the line 392:
function requireMysqlConnection($server, $username, $password, $testDetails) {
$this->testing($testDetails);
$conn = @mysql_connect($server, $username, $password);
if($conn) {
return true;
/*
if(mysql_query("CREATE DATABASE testing123")) {
mysql_query("DROP DATABASE testing123");
return true;
} else {
$testDetails[2] .= " (user '$username' doesn't have CREATE DATABASE permissions.)";
$this->error($testDetails);
}
*/
} else {
$testDetails[2] .= ": " . mysql_error();
$this->error($testDetails);
}
mysql_query ("SET CHARACTER SET utf8");
}
When you run the installer, you will get an error in the top of the page, but don't pay attention to this, just enter your db name, password etc. and click "recheck the requirements". Should work as magic. :-)
Please, reply when done, just to make sure everything is OK.