$multiotp->SetCallingMac($calling_mac);
$multiotp->SetChapId($chap_id);
$multiotp->SetChapChallenge($chap_challenge);
$multiotp->SetChapPassword($chap_password);
$multiotp->SetMsChapChallenge($ms_chap_challenge);
$multiotp->SetMsChapResponse($ms_chap_response);
$multiotp->SetMsChap2Response($ms_chap2_response);
// Check if enough parameters for the MySQL backend
if ($mysql_backend) {
    if (count($mysql_parameters) < 4) {
        $result = 41;
        // ERROR: SQL error
        $command = "error";
    } else {
        $mysql_parameters = array_pad($mysql_parameters, 7, NULL);
        $multiotp->DefineMySqlConnection($mysql_parameters[0], $mysql_parameters[1], $mysql_parameters[2], $mysql_parameters[3], $mysql_parameters[4], $mysql_parameters[5], $mysql_parameters[6]);
    }
}
switch ($command) {
    case "version":
        echo $multiotp->GetClassName() . " " . $multiotp->GetVersion() . " (" . $multiotp->GetDate() . ")" . $crlf;
        $result = 19;
        break;
    case "version-only":
        echo $multiotp->GetVersion();
        $result = 19;
        break;
    case "php-version":
        echo 'PHP ' . phpversion() . $crlf;
        $result = 19;
        break;