-
Bug
-
Resolution: Fixed
-
Minor
-
1.9.12
-
Apache/2.2.17
PHP/5.3.5
MySQL Server 5.5
-
MySQL
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE
-
-
Easy
-
I'm running Moodle 1.9.12+ (Build: 20110701) with MySQL 5.5 and after configuring LDAP Authentication i try to execute the "moodle\auth\ldap\auth_ldap_sync_users.php" script to synchronize my users. But the following error is shown:
Configuring temp table
Creating temp table mdl_extuser
Failed to create temporary users table - aborting
The problem is in line #566 of script "moodle\auth\ldap\auth.php", because in MySQL 5.5 doesn't support "type" table option, instead it uses ENGINE option. So i changed the code from:
$createtemptablesql = 'CREATE TEMPORARY TABLE ' . $temptable . ' (username VARCHAR(64), PRIMARY KEY (username)) TYPE=MyISAM';
To:
$createtemptablesql = 'CREATE TEMPORARY TABLE ' . $temptable . ' (username VARCHAR(64), PRIMARY KEY (username)) ENGINE=MyISAM';
But it will probably fail on MySQL older versions.