Shimmie Repair Console
Basic Checks";
echo "If these checks fail, something is broken; if they all pass, ";
echo "something
might be broken, just not checked for...";
eok("Images writable", is_writable("images"));
eok("Thumbs writable", is_writable("thumbs"));
eok("Data writable", is_writable("data"));
/*
echo "
New Database DSN
";
echo "
";
*/
echo "
Log Out
";
echo "
";
}
else if($_GET["action"] == "logout") {
session_destroy();
}
} else {
echo "
Login
Enter the database DSN exactly as in config.php (ie, as originally
installed) to access advanced recovery tools:
";
}
echo "\t\t
";
exit;
}
require_once "core/compat.inc.php";
require_once "core/database.class.php";
do_install();
// utilities {{{
function check_gd_version() {
$gdversion = 0;
if (function_exists('gd_info')){
$gd_info = gd_info();
if (substr_count($gd_info['GD Version'], '2.')) {
$gdversion = 2;
} else if (substr_count($gd_info['GD Version'], '1.')) {
$gdversion = 1;
}
}
return $gdversion;
}
function check_im_version() {
if(!ini_get('safe_mode')) {
$convert_check = exec("convert");
}
return (empty($convert_check) ? 0 : 1);
}
function eok($name, $value) {
echo "PHP's GD extension seems to be missing, ".
"and imagemagick's \"convert\" command cannot be found - ".
"no thumbnailing engines are available.";
}
if(!function_exists("mysql_connect")) {
$dberr = "
PHP's MySQL extension seems to be missing; you may ".
"be able to use an unofficial alternative, checking ".
"for libraries...";
if(!function_exists("pg_connect")) {
$dberr .= "
PgSQL is missing";
}
else {
$dberr .= "
PgSQL is available";
}
if(!function_exists("sqlite_open")) {
$dberr .= "
SQLite is missing";
}
else {
$dberr .= "
SQLite is available";
}
}
if($thumberr || $dberr) {
$err = "