Make sure this user has INSERT,UPDATE,DELETE,CREATE,ALTER permission to the database!');
define('PASSWORD_HELP', 'The password used to connect to the database.');
define('PREFIX_HELP', 'The string to prefix the tables with. Example: A table called rss_item should have rss as the prefix.');
define('ADMIN_USERNAME_HELP', 'The administrator username to use for database creation.');
define('ADMIN_PASSWORD_HELP', 'The administrator password used to connect to the database. Make sure this user has GRANT privileges!');
define('WEBSERVER_HELP', 'The location of the webserver. If in doubt, leave the default. Default: ' . WEB_SERVER_DEFAULT . '');
global $hasWritePerm;
function install_main() {
$hasXML = function_exists('xml_parser_create');
$hasMySQL = function_exists('mysql_connect');
$hasSQLite = function_exists('sqlite_open');
$hasSocket = function_exists('fsockopen');
// $hasSQLite = true;
// If the server is running safe mode, try writing a temp file.
if(ini_get('safe_mode')) {
define ('TMPINIT', DBINIT . GREGARIUS_CODENAME . "tmp");
$fp = @fopen(TMPINIT, 'w');
if ($fp) {
$hasWritePerm = true;
fclose($fp);
unlink (TMPINIT);
} else {
$hasWritePerm = false;
}
} else { // else, just check to see if it's writable.
$hasWritePerm = is_writable(dirname(__FILE__));
}
if($hasMySQL && $hasSQLite) {
$sql = "MySQL & SQLite";
} else if($hasMySQL) {
$sql = "MySQL";
} else if($hasSQLite) {
$sql = "SQLite";
} else {
$sql = "None!";
}
echo ""
. "\n"
. "\n"
. "