installer exit codes
Conflicts: install.php
This commit is contained in:
parent
e5511ec801
commit
4e79cbdc18
39
install.php
39
install.php
@ -14,17 +14,7 @@
|
|||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
/*
|
date_default_timezone_set('UTC');
|
||||||
<!--
|
|
||||||
- install.php (c) Shish et all. 2007-2013
|
|
||||||
-
|
|
||||||
- Initialise the database, check that folder
|
|
||||||
- permissions are set properly.
|
|
||||||
-
|
|
||||||
- This file should be independant of the database
|
|
||||||
- and other such things that aren't ready yet
|
|
||||||
-->
|
|
||||||
*/
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
@ -273,7 +263,7 @@ function create_tables() { // {{{
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
</div>
|
</div>
|
||||||
EOD;
|
EOD;
|
||||||
exit;
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->create_table("aliases", "
|
$db->create_table("aliases", "
|
||||||
@ -338,33 +328,30 @@ EOD;
|
|||||||
$db->execute("INSERT INTO config(name, value) VALUES('db_version', 11)");
|
$db->execute("INSERT INTO config(name, value) VALUES('db_version', 11)");
|
||||||
$db->commit();
|
$db->commit();
|
||||||
}
|
}
|
||||||
catch(PDOException $e)
|
catch(PDOException $e) {
|
||||||
{
|
|
||||||
print <<<EOD
|
print <<<EOD
|
||||||
<div id="installer">
|
<div id="installer">
|
||||||
<h1>Shimmie Installer</h1>
|
<h1>Shimmie Installer</h1>
|
||||||
<h3>Database Error:</h3>
|
<h3>Database Error:</h3>
|
||||||
<p>An error occured while trying to create the database tables necessary for Shimmie.</p>
|
<p>An error occured while trying to create the database tables necessary for Shimmie.</p>
|
||||||
<p>Please check and ensure that the database configuration options are all correct.</p>
|
<p>Please check and ensure that the database configuration options are all correct.</p>
|
||||||
<br/><br/>
|
<p>{$e->getMessage()}</p>
|
||||||
</div>
|
</div>
|
||||||
EOD;
|
EOD;
|
||||||
exit($e->getMessage());
|
exit(3);
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e) {
|
||||||
{
|
|
||||||
print <<<EOD
|
print <<<EOD
|
||||||
<div id="installer">
|
<div id="installer">
|
||||||
<h1>Shimmie Installer</h1>
|
<h1>Shimmie Installer</h1>
|
||||||
<h3>Unknown Error:</h3>
|
<h3>Unknown Error:</h3>
|
||||||
<p>An unknown error occured while trying to create the database tables necessary for Shimmie.</p>
|
<p>An unknown error occured while trying to create the database tables necessary for Shimmie.</p>
|
||||||
<p>Please check the server log files for more information.</p>
|
<p>Please check the server log files for more information.</p>
|
||||||
<br/><br/>
|
<p>{$e->getMessage()}</p>
|
||||||
</div>
|
</div>
|
||||||
EOD;
|
EOD;
|
||||||
exit($e->getMessage());
|
exit(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // }}}
|
} // }}}
|
||||||
|
|
||||||
function insert_defaults() { // {{{
|
function insert_defaults() { // {{{
|
||||||
@ -387,10 +374,10 @@ function insert_defaults() { // {{{
|
|||||||
<h3>Database Error:</h3>
|
<h3>Database Error:</h3>
|
||||||
<p>An error occured while trying to insert data into the database.</p>
|
<p>An error occured while trying to insert data into the database.</p>
|
||||||
<p>Please check and ensure that the database configuration options are all correct.</p>
|
<p>Please check and ensure that the database configuration options are all correct.</p>
|
||||||
<br/><br/>
|
<p>{$e->getMessage()}</p>
|
||||||
</div>
|
</div>
|
||||||
EOD;
|
EOD;
|
||||||
exit($e->getMessage());
|
exit(5);
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
@ -400,10 +387,10 @@ EOD;
|
|||||||
<h3>Unknown Error:</h3>
|
<h3>Unknown Error:</h3>
|
||||||
<p>An unknown error occured while trying to insert data into the database.</p>
|
<p>An unknown error occured while trying to insert data into the database.</p>
|
||||||
<p>Please check the server log files for more information.</p>
|
<p>Please check the server log files for more information.</p>
|
||||||
<br/><br/>
|
<p>{$e->getMessage()}</p>
|
||||||
</div>
|
</div>
|
||||||
EOD;
|
EOD;
|
||||||
exit($e->getMessage());
|
exit(6);
|
||||||
}
|
}
|
||||||
} // }}}
|
} // }}}
|
||||||
|
|
||||||
@ -435,7 +422,7 @@ function build_dirs() { // {{{
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
exit;
|
exit(7);
|
||||||
}
|
}
|
||||||
} // }}}
|
} // }}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user