if ($err) { echo "<h4>Installing database failed. Check php.ini and try again. If the problem persists, please contact with your administrator.</h4>"; exit; } echo "<br />"; function CheckExtension($extension, $err) { if (extension_loaded($extension)) { return "ENABLED"; } else { $err = true; return "DISABLED"; } } try { Config::$SaveErrorToDataBase = false; $db = DataBase::GetDbInstance(); $result = $db->ExecuteQuery("SELECT now()"); $err = $db->LastError(); if ($err != "") { throw new Exception("Connection failed:<br />" . $db->LastError()); } else { echo "Connection parameters OK.<br />"; } $path = "../photos"; if (!file_exists($path)) { mkdir($path); } } catch (Exception $ex) { echo $ex->getMessage(); echo "<h4>Installing database failed. Check configuration (config.php file) and try again. If the problem persists, please contact with us.</h4>";