Enable debugging by inserting the following lines to config.php:
@error_reporting(E_ALL | E_STRICT);
@ini_set('display_errors', '1');
$CFG->debug = (E_ALL | E_STRICT);
$CFG->debugdisplay = 1;
Put these before the require_once(__DIR__ . '/lib/setup.php'); line. This should show more details with the "Multiple records found" error.