function init($options) { parent::init($options); $this->repoSerialFile = $options["REPOSITORIES_FILEPATH"]; $this->usersSerialDir = $options["USERS_DIRPATH"]; $this->rolesSerialFile = $options["ROLES_FILEPATH"]; }
/** * Initialise the driver. * * Expects options containing a key 'SQL_DRIVER' with constructor values from dibi::connect() * * Example: * "SQL_DRIVER" => Array( * 'driver' => 'sqlite', * 'file' => "./server/ajxp.db" * ) * * Example 2: * "SQL_DRIVER" => Array( * 'driver' => 'mysql', * 'host' => 'localhost', * 'username' => 'root', * 'password' => '***', * 'database' => 'dbname' * ) * * @see AbstractConfDriver#init($options) */ public function init($options) { parent::init($options); $this->sqlDriver = AJXP_Utils::cleanDibiDriverParameters($options["SQL_DRIVER"]); try { if (!dibi::isConnected()) { dibi::connect($this->sqlDriver); } if (AJXP_SERVER_DEBUG && AJXP_VERSION_DB != "##DB_VERSION##") { $res = dibi::query("select MAX(db_build) from [ajxp_version]"); if (!empty($res)) { $dbVersion = intval($res->fetchSingle()); $current = intval(AJXP_VERSION_DB); if ($dbVersion > 0 && $dbVersion < $current) { // We need to upgrade now! error_log("[Pydio] DB Upgrade Required! You may encounter strange issues. Make sure to manually apply the DB update."); $this->logError("[DB]", "DB Upgrade Required! You may encounter strange issues. Make sure to manually apply the DB update."); } } } } catch (DibiException $e) { //throw $e; echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } }
public function init($options) { parent::init($options); $this->repoSerialFile = AJXP_VarsFilter::filter($this->options["REPOSITORIES_FILEPATH"]); $this->usersSerialDir = AJXP_VarsFilter::filter($this->options["USERS_DIRPATH"]); $this->rolesSerialFile = AJXP_VarsFilter::filter($this->options["ROLES_FILEPATH"]); $this->aliasesIndexFile = dirname($this->repoSerialFile) . "/aliases.ser"; $this->pluginsConfigsFile = dirname($this->repoSerialFile) . "/plugins_configs.ser"; }
public function init($options) { parent::init($options); try { $this->getPluginWorkDir(true); } catch (Exception $e) { die("Impossible write into the AJXP_DATA_PATH folder: Make sure to grant write access to this folder for your webserver!"); } }
/** * Initialise the driver. * * Expects options containing a key 'SQL_DRIVER' with constructor values from dibi::connect() * * Example: * "SQL_DRIVER" => Array( * 'driver' => 'sqlite', * 'file' => "./server/ajxp.db" * ) * * Example 2: * "SQL_DRIVER" => Array( * 'driver' => 'mysql', * 'host' => 'localhost', * 'username' => 'root', * 'password' => '***', * 'database' => 'dbname' * ) * * @see server/classes/AbstractConfDriver#init($options) */ function init($options) { parent::init($options); $this->sqlDriver = $options["SQL_DRIVER"]; try { dibi::connect($this->sqlDriver); } catch (DibiException $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } }
public function init($options) { parent::init($options); try { $dir = $this->getPluginWorkDir(true); if (!is_file($dir . DIRECTORY_SEPARATOR . "server_uuid")) { file_put_contents($dir . DIRECTORY_SEPARATOR . "server_uuid", md5(json_encode($_SERVER))); } } catch (Exception $e) { die("Impossible write into the AJXP_DATA_PATH folder: Make sure to grant write access to this folder for your webserver!"); } }
/** * Initialise the driver. * * Expects options containing a key 'SQL_DRIVER' with constructor values from dibi::connect() * * Example: * "SQL_DRIVER" => Array( * 'driver' => 'sqlite', * 'file' => "./server/ajxp.db" * ) * * Example 2: * "SQL_DRIVER" => Array( * 'driver' => 'mysql', * 'host' => 'localhost', * 'username' => 'root', * 'password' => '***', * 'database' => 'dbname' * ) * * @see AbstractConfDriver#init($options) */ public function init($options) { parent::init($options); $this->sqlDriver = AJXP_Utils::cleanDibiDriverParameters($options["SQL_DRIVER"]); try { dibi::connect($this->sqlDriver); } catch (DibiException $e) { //throw $e; echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } }
/** * Initialise the driver. * * Expects options containing a key 'SQL_DRIVER' with constructor values from dibi::connect() * * Example: * "SQL_DRIVER" => Array( * 'driver' => 'sqlite', * 'file' => "./server/ajxp.db" * ) * * Example 2: * "SQL_DRIVER" => Array( * 'driver' => 'mysql', * 'host' => 'localhost', * 'username' => 'root', * 'password' => '***', * 'database' => 'dbname' * ) * * @see AbstractConfDriver#init($options) */ function init($options) { parent::init($options); require_once AJXP_BIN_FOLDER . "/dibi.compact.php"; $this->sqlDriver = $options["SQL_DRIVER"]; try { dibi::connect($this->sqlDriver); } catch (DibiException $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } }