2 // error_log("INCALLSTART ".print_r($_COOKIE, true)." -------------------- ".print_r($_SERVER,true)." ---------- ".print_r($_REQUEST, true));
3 $WEB_ROOT_FS = realpath(dirname(__FILE__));
\r
4 $BASE_URL = dirname($_SERVER["PHP_SELF"]);
\r
6 global $WEB_ROOT_FS, $BASE_URL, $data_directory, $db_type, $db_name, $db_username, $db_password, $IS_WEB_REQUEST, $cmd_line_tool;
8 $IS_WEB_REQUEST = true;
\r
10 if(file_exists("./config.php")) require_once("./config.php");
11 else if(file_exists("/etc/gwvpmini/config.php")) require_once("/etc/gwvpmini/config.php");
12 else $noconfig = true;
14 if(file_exists("../gwvpmini/gwvpmini.php")) require_once("../gwvpmini/gwvpmini.php");
15 else if(file_exists("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php")) require_once("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php");
18 if(isset($noconfig)) {
23 // error_log("CMDLINETOOL: ".$cmd_line_tool);
25 // need to make this db agnostic
26 if(!gwvpmini_DBExists($db_name)) {
27 if(!is_dir("$data_directory/repos")) mkdir("$data_directory/repos");
29 error_log("CREATEDATABASE");
30 gwvpmini_dbCreateSQLiteStructure($db_name);
31 gwvpmini_setConfigVal("repodir", "$data_directory/repos");
34 // error_log("REQUEST BEGIN");