-
Bug
-
Resolution: Fixed
-
Minor
-
2.0.1
-
None
-
MYSQL
* Server: Localhost via UNIX socket
* version: 5.5.8
* Protocol version: 10
* user: root@localhost
* charset: UTF-8 Unicode (utf8)
Webserver
* Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8o
* MySQL client lib: 5.5.8
* PHP-kiterjesztés: mysqli
* PHP: 5.3.4
-
MySQL
-
MOODLE_20_STABLE
-
MOODLE_20_STABLE
-
Moderate
Continuing on MDL-25910... I've upgraded to the latest $release = '2.0.1+ (Build: 20110204)';
After upgrade, I modified my config.php to this:
$CFG->dbtype = 'mysqli';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle_openwide';
$CFG->dbuser = 'moodle_openwide';
$CFG->dbpass = pass;
$CFG->prefix = 'mdl_';
$CFG->dblibrary = 'native'; // 'native' only at the moment
$CFG->dboptions = array(
'dbpersist' => false,
'dbsocket' => '/web/mysql/mysql.sock',
'dbport' => '',
);
Based on the comments in config_dist.php this should work. But it is not. I got the following error in php log:
[06-Feb-2011 18:42:24] PHP Warning: mysqli::mysqli() expects parameter 5 to be long, string given in /web/www/openwide-moodle/lib/dml/mysqli_native_moodle_
database.php on line 281
[06-Feb-2011 18:42:24] PHP Warning: mysqli::set_charset() [<a href='mysqli.set-charset'>mysqli.set-charset</a>]: Couldn't fetch mysqli in /web/www/
openwide-moodle/lib/dml/mysqli_native_moodle_database.php on line 291
[06-Feb-2011 18:42:24] PHP Warning: mysqli_native_moodle_database::get_server_info() [<a href='mysqli-native-moodle-database.get-server-info'>mysqli-native-
moodle-database.get-server-info</a>]: Couldn't fetch mysqli in /web/www/openwide-moodle/lib/dml/mysqli_native_moodle_database.php on line 331
[06-Feb-2011 18:42:24] PHP Warning: mysqli_native_moodle_database::get_server_info() [<a href='mysqli-native-moodle-database.get-server-info'>mysqli-native-
moodle-database.get-server-info</a>]: Couldn't fetch mysqli in /web/www/openwide-moodle/lib/dml/mysqli_native_moodle_database.php on line 331
[06-Feb-2011 18:42:24] PHP Warning: mysqli::query() [<a href='mysqli.query'>mysqli.query</a>]: Couldn't fetch mysqli in /web/www/openwide-moodle/lib/dml/
mysqli_native_moodle_database.php on line 774
[06-Feb-2011 18:42:24] PHP Fatal error: Call to a member function fetch_assoc() on a non-object in /web/www/openwide-moodle/lib/dml/mysqli_native_moodle_
database.php on line 779
it's clear, that mysqli_native_moodle_database.php on line 281 there is a bug. I could resolve it by doing the change in the attached picture. Nevertheless the (int) conversion some lines above the mysqli_connect, the function call still not working.
It seems, ini_get retrieves a string, and this is the problem.