Ignore:
Timestamp:
2012-07-27T09:17:42+02:00 (3 years ago)
Author:
Xuefer
Message:

refactor: move htdocs, bin, lib for easier installation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/cacher/config.example.php

    r920 r1053  
    11<?php
    22
    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;
     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// XCache will load
     8// 1. ../config.default.php
     9// 2. ./config.default.php
     10// 3. ../config.php
     11// 4. ./config.php
    1512
    1613// width of graph for free or usage blocks
     
    2219$config['enable_eval'] = false;
    2320
    24 // this ob filter is applied for the cache list, not the whole page
    25 function 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 /*
    39 function 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 
    65 check_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 TracChangeset for help on using the changeset viewer.