\n");
// Extensions
if (!extension_loaded("exif")) $error .= ("Error 200: PHP exif extension not activated.
\n");
if (!extension_loaded("mbstring")) $error .= ("Error 201: PHP mbstring extension not activated.
\n");
if (!extension_loaded("gd")) $error .= ("Error 202: PHP gd extension not activated.
\n");
if (!extension_loaded("mysqli")) $error .= ("Error 203: PHP mysqli extension not activated.
\n");
// Config
if (!$db||$db=="") $error .= ("Error 300: No property for \$db in config.php.
\n");
if (!$dbUser||$dbUser=="") $error .= ("Error 301: No property for \$dbUser in config.php.
\n");
if (!$dbPassword||$dbPassword=="") $error .= ("Error 302: No property for \$dbPassword in config.php.
\n");
if (!$dbHost||$dbHost=="") $error .= ("Error 303: No property for \$dbHost in config.php.
\n");
if (!$user||$user=="") $error .= ("Error 304: No property for \$user in config.php.
\n");
if (!$password||$password=="") $error .= ("Error 305: No property for \$password in config.php.
\n");
// Database
$database = new mysqli($dbHost, $dbUser, $dbPassword, $db);
if (mysqli_connect_errno()!=0) $error .= ("Error 400: " . mysqli_connect_errno() . ": " . mysqli_connect_error() . "
\n");
// Permissions
if (substr(sprintf('%o', fileperms("../uploads/big/")), -4) != "0777") $error .= ("Error 500: Wrong permissions for \"/uploads/big\" (777 required).
\n");
if (substr(sprintf('%o', fileperms("../uploads/thumb/")), -4) != "0777") $error .= ("Error 501: Wrong permissions for \"/uploads/thumb\" (777 required).
\n");
if (substr(sprintf('%o', fileperms("../uploads/import/")), -4) != "0777") $error .= ("Error 502: Wrong permissions for \"/uploads/import\" (777 required).
\n");
if ($error == "") echo("Lychee is ready!"); else echo $error;
?>