2 $WEB_ROOT_FS = realpath(dirname(__FILE__));
\r
3 $BASE_URL = dirname($_SERVER["PHP_SELF"]);
\r
5 global $WEB_ROOT_FS, $BASE_URL, $data_directory, $db_type, $db_name, $db_username, $db_password;
\r
7 if(file_exists("./config.php")) require_once("./config.php");
8 else if(file_exists("/etc/gwvpmini/config.php")) require_once("/etc/gwvpmini/config.php");
11 if(file_exists("../gwvpmini/gwvpmini.php")) require_once("../gwvpmini/gwvpmini.php");
12 else if(file_exists("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php")) require_once("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php");
16 if(isset($noconfig)) {
21 // need to make this db agnostic
22 if(!gwvpmini_DBExists($db_name)) {
23 if(!is_dir("$data_directory/repos")) mkdir("$data_directory/repos");
25 error_log("CREATEDATABASE");
26 gwvpmini_dbCreateSQLiteStructure($db_name);
27 gwvpmini_setConfigVal("repodir", "$data_directory/repos");