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

Last change on this file since 920 was 920, checked in by moo, 3 years ago

add back default

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