| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | // DO NOT rename/delete/modify example file which will be overwritten when upgrade |
|---|
| 4 | // How To Custom Config: |
|---|
| 5 | // 1. copy config.example.php config.php; edit config.php |
|---|
| 6 | // 2. 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 | // this ob filter is applied for the cache list, not the whole page |
|---|
| 17 | function custom_ob_filter_path_nicer($list_html) |
|---|
| 18 | { |
|---|
| 19 | $list_html = ob_filter_path_nicer_default($list_html); // this function is from common.php |
|---|
| 20 | return $list_html; |
|---|
| 21 | } |
|---|
| 22 | $config['path_nicer'] = 'custom_ob_filter_path_nicer'; |
|---|
| 23 | |
|---|
| 24 | // "XCache Cacher" http auth for is enforced for security reason |
|---|
| 25 | // if http auth is disabled, any vhost user who can upload *.php will see all variable data cached in XCache |
|---|
| 26 | |
|---|
| 27 | /*// but if you have your own login/permission system, you can integerate it using the following example |
|---|
| 28 | // {{{ login example |
|---|
| 29 | // this is an example only, it's won't work for you without your implemention. |
|---|
| 30 | |
|---|
| 31 | function check_admin_and_by_pass_xcache_http_auth() |
|---|
| 32 | { |
|---|
| 33 | require("/path/to/user-login-and-permission-lib.php"); |
|---|
| 34 | session_start(); |
|---|
| 35 | |
|---|
| 36 | if (user_logined()) { |
|---|
| 37 | user_load_permissions(); |
|---|
| 38 | if (user_is_admin()) { |
|---|
| 39 | // user is trusted after permission checks above. |
|---|
| 40 | // tell XCache about it (the only secure way to by pass XCache http auth) |
|---|
| 41 | $_SERVER["PHP_AUTH_USER"] = "moo"; |
|---|
| 42 | $_SERVER["PHP_AUTH_PW"] = "your-xcache-password-before-md5"; |
|---|
| 43 | } |
|---|
| 44 | else { |
|---|
| 45 | die("Permission denied"); |
|---|
| 46 | } |
|---|
| 47 | } |
|---|
| 48 | else { |
|---|
| 49 | if (!ask_the_user_to_login()) { |
|---|
| 50 | exit; |
|---|
| 51 | } |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| 54 | return true; |
|---|
| 55 | } |
|---|
| 56 | |
|---|
| 57 | check_admin_and_by_pass_xcache_http_auth(); |
|---|
| 58 | */ |
|---|
| 59 | // }}} |
|---|
| 60 | |
|---|
| 61 | /* by pass XCache http auth |
|---|
| 62 | $_SERVER["PHP_AUTH_USER"] = "moo"; |
|---|
| 63 | $_SERVER["PHP_AUTH_PW"] = "your-xcache-password-before-md5"; |
|---|
| 64 | */ |
|---|
| 65 | |
|---|