// Joomla! >= 1.5 $config = new JConfig(); $server->db_host = $config->host; $server->db_name = $config->db; $server->db_user = $config->user; $server->db_passwd = $config->password; $server->db_type = $config->dbtype; $server->db_prefix = $config->dbprefix . '_extwebdav_'; } elseif (!empty($mosConfig_absolute_path)) { // Joomla! 1.0 $server->db_host = $mosConfig_host; $server->db_name = $mosConfig_db; $server->db_user = $mosConfig_user; $server->db_passwd = $mosConfig_password; $server->db_type = 'mysql'; $server->db_prefix = $mosConfig_dbprefix . '_extwebdav_'; } else { header('HTTP/1.0 500 Internal Error'); echo 'Internal Error: Configuration File not found.'; exit; } } else { $server->db_host = $GLOBALS['DB_HOST']; $server->db_name = $GLOBALS['DB_NAME']; $server->db_user = $GLOBALS['DB_USER']; $server->db_passwd = $GLOBALS['DB_PASSWORD']; $server->db_type = $GLOBALS['DB_TYPE']; } # Real path of your site $server->ServeRequest($GLOBALS["home_dir"]);
<?php // $Id$ ini_set("include_path", ini_get("include_path") . ":/usr/local/apache/htdocs"); require_once "HTTP/WebDAV/Server/Filesystem.php"; $server = new HTTP_WebDAV_Server_Filesystem(); $server->ServeRequest($_SERVER["DOCUMENT_ROOT"]);
require ROOT . '/angie.php'; require ANGIE_PATH . '/init.php'; $application =& application(); $application->prepare(array('initialize_resources' => true, 'connect_to_database' => true, 'initialize_smarty' => true, 'init_modules' => true, 'authenticate' => true, 'init_locale' => true, 'load_hooks' => true)); //array $application->init(); include_once WEBDAV_MODULE_PATH . '/models/authenticate.php'; $not_installed_modules = Modules::findNotInstalled(); foreach ($not_installed_modules as $module) { if ($module->name == 'webdav') { header("HTTP/1.1 503 Service Unavailable"); die('Module is not installed'); } } if (!ConfigOptions::getValue('webdav_enabled')) { header("HTTP/1.1 503 Service Unavailable"); die('Module has been disabled by administrator'); } //if // Activate if your PHP is CGI mode $phpcgi = 0; $realm = 'activeCollab webdav area'; $user = AuthenticationBasicHTTP($realm); require_once WEBDAV_MODULE_PATH . '/models/filesystem.php'; $server = new HTTP_WebDAV_Server_Filesystem(); $server->ServeRequest(false, $user); } else { header("HTTP/1.1 503 Service Unavailable"); die; } // if
ini_set("default_charset", "UTF-8"); //ini_set("error_reporting", E_ALL); $realm = 'Restricted area Keyphrene'; $DBUSER = "******"; $DBPWD = "hello"; $DB_WEBDAV = 'webdav'; $users = array($DBUSER => $DBPWD); //AuthenticationDigestHTTP($realm, $users); //AuthenticationBasicHTTP($realm, $users); if (isset($_SERVER["ORIG_PATH_INFO"])) { $_SERVER["PATH_INFO"] = $_SERVER["ORIG_PATH_INFO"]; //$_SERVER["PATH_INFO"] = $_SERVER["REQUEST_URI"]; } else { if (isset($_SERVER["REQUEST_URI"])) { $_SERVER["PATH_INFO"] = $_SERVER["REQUEST_URI"]; } } if (isset($_SERVER['HTTP_CONTENT_LENGTH'])) { $_SERVER["CONTENT_LENGTH"] = $_SERVER['HTTP_CONTENT_LENGTH']; unset($_SERVER['HTTP_CONTENT_LENGTH']); } error_log(var_export($_SERVER, true)); require_once "HTTP/WebDAV/Server/Filesystem.php"; $server = new HTTP_WebDAV_Server_Filesystem(); $server->db_host = $DBHOST; $server->db_name = $DB_WEBDAV; $server->db_user = $DBUSER; $server->db_passwd = $DBPWD; //$server->ServeRequest(_SITE_PATH); $server->ServeRequest("/home/showing/");