source: trunk/admin/config.example.php @ 911

Last change on this file since 911 was 911, checked in by moo, 2 years ago

adding back example file

  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1<?php
2
3// DO NOT modify this file
4// if you want to customize config, copy this file and name it as config.php
5// upgrading your config.php when config.example.php were upgraded
6
7// leave this setting unset to auto detect using browser request header
8// $config['lang'] = 'en-us';
9
10$config['charset'] = "UTF-8";
11
12// enable this for translators only
13$config['show_todo_strings'] = false;
14
15// width of graph for free or usage blocks
16$config['percent_graph_width'] = 120;
17$config['percent_graph_type'] = 'used'; // either 'used' or 'free'
18
19// only enable if you have password protection for admin page
20// enabling this option will cause user to eval() whatever code they want
21$config['enable_eval'] = false;
22
23// this ob filter is applied for the cache list, not the whole page
24function custom_ob_filter_path_nicer($list_html)
25{
26    $list_html = ob_filter_path_nicer_default($list_html); // this function is from common.php
27    return $list_html;
28}
29$config['path_nicer'] = 'custom_ob_filter_path_nicer';
30
31// XCache builtin http auth is enforce for security reason
32// if http auth is disabled, any vhost user that can upload *.php, will see all variable data cached in XCache
33
34// but if you have your own login/permission system, you can use the following example
35// {{{ login example
36// this is an example only, it's won't work for you without your implemention.
37/*
38function check_admin_and_by_pass_xcache_http_auth()
39{
40    require("/path/to/user-login-and-permission-lib.php");
41    session_start();
42
43    if (user_logined()) {
44        user_load_permissions();
45        if (user_is_admin()) {
46            // user is trusted after permission checks above.
47            // tell XCache about it (the only secure way to by pass XCache http auth)
48            $_SERVER["PHP_AUTH_USER"] = "moo";
49            $_SERVER["PHP_AUTH_PW"] = "your-xcache-password-before-md5";
50        }
51        else {
52            die("Permission denied");
53        }
54    }
55    else {
56        if (!ask_the_user_to_login()) {
57            exit;
58        }
59    }
60
61    return true;
62}
63
64check_admin_and_by_pass_xcache_http_auth();
65*/
66// }}}
67
68/* by pass XCache http auth
69$_SERVER["PHP_AUTH_USER"] = "moo";
70$_SERVER["PHP_AUTH_PW"] = "your-xcache-password-before-md5";
71*/
72
73?>
Note: See TracBrowser for help on using the repository browser.