@extends('themes.default1.installer.layout.installer')
@section('license')
done
@stop
@section('environment')
done
@stop
@section('database')
active
@stop
@section('content')
Database Setup
This test will check prerequisites required to install Faveo
Faveo HELPDESK 1.0 and Newer');
define('STATUS_OK', 'Ok');
define('STATUS_WARNING', 'Warning');
define('STATUS_ERROR', 'Error');
class TestResult {
var $message;
var $status;
function __construct($message, $status = STATUS_OK) {
$this->message = $message;
$this->status = $status;
}
}
// TestResult
if (DB_HOST && DB_USER && DB_NAME) {
?>
= 0) {
$results[] = new TestResult('MySQL version is ' . $mysqli_version, STATUS_OK);
// $have_inno = check_have_inno($connection);
$sql = "SHOW TABLES FROM " . DB_NAME;
$res = mysqli_query($connection, $sql);
if (mysqli_fetch_array($res) === null) {
$results[] = new TestResult('Database is empty');
$mysqli_ok = true;
} else {
$results[] = new TestResult('Faveo installation requires an empty database, your database already has tables and data in it.', STATUS_ERROR);
$mysqli_ok = false;
}
} else {
$results[] = new TestResult('Your MySQL version is ' . $mysqli_version . '. We recommend upgrading to at least MySQL8!', STATUS_ERROR);
$mysqli_ok = false;
} // if
} else {
$results[] = new TestResult('Failed to select database. ' . mysqli_connect_error(), STATUS_ERROR);
$mysqli_ok = false;
} // if
} else {
$results[] = new TestResult('Failed to connect to database. ' . mysqli_connect_error(), STATUS_ERROR);
$mysqli_ok = false;
} // if
}
}catch (\Exception $exception) {
$results[] = new TestResult('Failed to connect to database. ' . $exception->getMessage(), STATUS_ERROR);
$mysqli_ok = false;
}
// elseif($default == 'pgsql') {
// if ($connection2 = pg_connect("'host='.DB_HOST.' port='.DB_PORT.' dbname='.DB_NAME.' user='.DB_USER.' password='.DB_PASS.")) {
// $results[] = new TestResult('Connected to database as ' . DB_USER . '@' . DB_HOST, STATUS_OK);
// } else {
// $results[] = new TestResult('Failed to connect to database. PgSQL said: ' . mysqli_error(), STATUS_ERROR);
// $mysqli_ok = false;
// }
// } elseif($default == 'sqlsrv') {
// }
// ---------------------------------------------------
// Validators
// ---------------------------------------------------
// dd($results);
?>' . $result->status . ' — ' . $result->message . '';
} // foreach
?>
If you have fixed all the errors. Click here to continue the installation process.
Database connection successful. This system can run Faveo
{!! Form::open( ['id'=>'form','method' => 'POST'] )!!}
{{-- --}}
Database connection unsuccessful. This system does not meet Faveo system requirements
This either means that the username and password information is incorrect or we can’t contact the database server. This could mean your host’s database server is down.
Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the Faveo Support .
{{--
--}}
Ok — All Ok
Warning — Not a deal breaker, but it's recommended to have this installed for some features to work
Error — Faveo HELPDESK require this feature and can't work without it
{{-- --}}
@stop