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
RevLine 
[34]1<?php
2
[920]3// this is example config
4// DO NOT rename/delete/modify this file
[911]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
[34]7
[911]8// leave this setting unset to auto detect using browser request header
[902]9// $config['lang'] = 'en-us';
[123]10
[902]11$config['charset'] = "UTF-8";
[34]12
[911]13// enable this for translators only
[902]14$config['show_todo_strings'] = false;
[123]15
[526]16// width of graph for free or usage blocks
[902]17$config['percent_graph_width'] = 120;
18$config['percent_graph_type'] = 'used'; // either 'used' or 'free'
[517]19
[591]20// only enable if you have password protection for admin page
21// enabling this option will cause user to eval() whatever code they want
[902]22$config['enable_eval'] = false;
[591]23
[34]24// this ob filter is applied for the cache list, not the whole page
[902]25function custom_ob_filter_path_nicer($list_html)
[34]26{
[902]27    $list_html = ob_filter_path_nicer_default($list_html); // this function is from common.php
28    return $list_html;
[34]29}
[902]30$config['path_nicer'] = 'custom_ob_filter_path_nicer';
[34]31
[911]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
[34]37// this is an example only, it's won't work for you without your implemention.
[902]38/*
[34]39function check_admin_and_by_pass_xcache_http_auth()
40{
41    require("/path/to/user-login-and-permission-lib.php");
42    session_start();
43
[911]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 {
[34]57        if (!ask_the_user_to_login()) {
58            exit;
59        }
60    }
61
62    return true;
63}
64
[902]65check_admin_and_by_pass_xcache_http_auth();
66*/
[34]67// }}}
68
[902]69/* by pass XCache http auth
70$_SERVER["PHP_AUTH_USER"] = "moo";
[911]71$_SERVER["PHP_AUTH_PW"] = "your-xcache-password-before-md5";
[902]72*/
73
[34]74?>
Note: See TracBrowser for help on using the repository browser.