mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-24 15:56:22 +00:00
fixed some permissions issues, setup system so that it has a is_installed file to determin if it should install or not
This commit is contained in:
parent
21f3c3ba0b
commit
9d67e29305
2 changed files with 12 additions and 8 deletions
|
@ -17,6 +17,9 @@ require_once( '../../ams_lib/libinclude.php' );
|
||||||
if (!@include '../config.php') {
|
if (!@include '../config.php') {
|
||||||
//if config doesnt exist run setup
|
//if config doesnt exist run setup
|
||||||
require( 'installer/libsetup.php' );
|
require( 'installer/libsetup.php' );
|
||||||
|
} elseif ($_POST["function"] == "do_install") {
|
||||||
|
echo "Can't run setup while file '../is_installed' exists, please remove that file if you wish to run the install"
|
||||||
|
exit
|
||||||
} else {
|
} else {
|
||||||
//if config exists then include it
|
//if config exists then include it
|
||||||
require( '../config.php' );
|
require( '../config.php' );
|
||||||
|
|
|
@ -62,11 +62,8 @@
|
||||||
`ReceiveMail` int(1) NOT NULL DEFAULT 1,
|
`ReceiveMail` int(1) NOT NULL DEFAULT 1,
|
||||||
`Language` varchar(3) DEFAULT NULL,
|
`Language` varchar(3) DEFAULT NULL,
|
||||||
PRIMARY KEY (`UId`)
|
PRIMARY KEY (`UId`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='contains all users information for ryzom_ams';
|
) ENGINE = InnoDB;
|
||||||
|
GRANT ALL ON `" . $cfg['db']['web']['name'] ."`.* TO `" . $cfg['db']['web']['user'] ."`@".$cfg['db']['web']['host']." identified by '".$cfg['db']['web']['pass']."';
|
||||||
);
|
|
||||||
|
|
||||||
GRANT ALL ON `" . $cfg['db']['web']['name'] ."`.* TO `" . $cfg['db']['web']['user'] ."`@".$cfg['db']['web']['host'].";
|
|
||||||
";
|
";
|
||||||
$dbw->executeWithoutParams($sql);
|
$dbw->executeWithoutParams($sql);
|
||||||
|
|
||||||
|
@ -472,7 +469,7 @@
|
||||||
ON DELETE NO ACTION
|
ON DELETE NO ACTION
|
||||||
ON UPDATE NO ACTION)
|
ON UPDATE NO ACTION)
|
||||||
ENGINE = InnoDB;
|
ENGINE = InnoDB;
|
||||||
GRANT ALL ON `" . $cfg['db']['lib']['name'] ."`.* TO `" . $cfg['db']['lib']['user'] ."`@".$cfg['db']['lib']['host'].";
|
GRANT ALL ON `" . $cfg['db']['lib']['name'] ."`.* TO `" . $cfg['db']['lib']['user'] ."`@".$cfg['db']['lib']['host']." identified by '".$cfg['db']['lib']['pass']."';
|
||||||
";
|
";
|
||||||
$dbl->executeWithoutParams($sql);
|
$dbl->executeWithoutParams($sql);
|
||||||
print "The Lib & Web database were correctly installed! <br />";
|
print "The Lib & Web database were correctly installed! <br />";
|
||||||
|
@ -587,7 +584,7 @@
|
||||||
KEY `GMId` (`GMId`)
|
KEY `GMId` (`GMId`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='contains all users informations for login system' AUTO_INCREMENT=1 ;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='contains all users informations for login system' AUTO_INCREMENT=1 ;
|
||||||
|
|
||||||
GRANT ALL ON `" . $cfg['db']['shard']['name'] ."`.* TO `" . $cfg['db']['shard']['user'] ."`@".$cfg['db']['shard']['host'].";
|
GRANT ALL ON `" . $cfg['db']['shard']['name'] ."`.* TO `" . $cfg['db']['shard']['user'] ."`@".$cfg['db']['shard']['host']." identified by '".$cfg['db']['shard']['pass']."';
|
||||||
";
|
";
|
||||||
$dbs->executeWithoutParams($sql);
|
$dbs->executeWithoutParams($sql);
|
||||||
print "The shard database was correctly installed! <br />";
|
print "The shard database was correctly installed! <br />";
|
||||||
|
@ -1370,7 +1367,7 @@
|
||||||
(164, 31, 104, 9),
|
(164, 31, 104, 9),
|
||||||
(165, 31, 103, 9);
|
(165, 31, 103, 9);
|
||||||
|
|
||||||
GRANT ALL ON `" . $cfg['db']['tool']['name'] ."`.* TO `" . $cfg['db']['tool']['user'] ."`@".$cfg['db']['tool']['host'].";
|
GRANT ALL ON `" . $cfg['db']['tool']['name'] ."`.* TO `" . $cfg['db']['tool']['user'] ."`@".$cfg['db']['tool']['host']." identified by '".$cfg['db']['tool']['pass']."';
|
||||||
";
|
";
|
||||||
$dbn->executeWithoutParams($sql);
|
$dbn->executeWithoutParams($sql);
|
||||||
print "The nel_tool database was correctly installed! <br />";
|
print "The nel_tool database was correctly installed! <br />";
|
||||||
|
@ -1394,9 +1391,13 @@
|
||||||
print "The admin account is created, you can login with id: admin, pass: admin!";
|
print "The admin account is created, you can login with id: admin, pass: admin!";
|
||||||
}catch (PDOException $e){
|
}catch (PDOException $e){
|
||||||
print "There was an error while creating the admin account! ";
|
print "There was an error while creating the admin account! ";
|
||||||
|
print_r($e);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<br><a href="'.$_SERVER['REQUEST_URI'].'" >Reload!</a> ';
|
echo '<br><a href="'.$_SERVER['REQUEST_URI'].'" >Reload!</a> ';
|
||||||
|
|
||||||
|
touch("../is_installed");
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue