| 1 | 2 | simandl | <?php |
| 2 | | | |
| 3 | | | /* |
| 4 | | | * Application scope storage backend to be used (php support needed) |
| 5 | | | * |
| 6 | | | * Default: APC |
| 7 | | | * |
| 8 | | | * Supported values: |
| 9 | | | * |
| 10 | | | * APC |
| 11 | | | * XCache |
| 12 | | | * Disabled |
| 13 | | | */ |
| 14 | | | define("APPLICATION_SCOPE_STORAGE","Disabled"); |
| 15 | | | |
| 16 | | | /* |
| 17 | | | * Application notifications (MessageBus) method |
| 18 | | | * |
| 19 | | | * WebSocket server needs to run using standalone socket.run.sh script |
| 20 | | | * which uses cgi-fcgi bridge to inject it to the same php-fpm or hhvm thread pool |
| 21 | | | * as the web server is running (this is need to be able to access same SHM |
| 22 | | | * and thus application scope variables). |
| 23 | | | * |
| 24 | | | * Comet approach uses traditional pending ajax requests (requires pcntl php supprt, |
| 25 | | | * works only on Unix/Linux based platforms). |
| 26 | | | * Requires application scope storage enabled |
| 27 | | | * |
| 28 | | | * Default: Both |
| 29 | | | * |
| 30 | | | * Supported values: |
| 31 | | | * |
| 32 | | | * Both |
| 33 | | | * WebSocket |
| 34 | | | * Comet |
| 35 | | | * Disabled |
| 36 | | | * |
| 37 | | | */ |
| 38 | | | define("MESSAGEBUS_MODE","Disabled"); |
| 39 | | | |
| 40 | | | /* |
| 41 | | | * Puller mode for application notifications |
| 42 | | | * (How to notify MessageBus runing on socket server from ordinary http request) |
| 43 | | | * This has no effect if MESSAGE_BUS is not set to "WebSocket" or "Both" |
| 44 | | | * |
| 45 | | | * ZMQ needs php support and currently doesn't work with HHVM. |
| 46 | | | * |
| 47 | | | * Default: ReactSocket |
| 48 | | | * |
| 49 | | | * Supported values: |
| 50 | | | * |
| 51 | | | * ReactSocket |
| 52 | | | * ZMQ |
| 53 | | | * Disabled |
| 54 | | | */ |
| 55 | | | define("WEBSOCKET_PULLER_MODE","Disabled"); |
| 56 | | | |
| 57 | | | define("ALLOW_ONLINE_CLIENT_NOTIFICATIONS",false); |
| 58 | | | |
| 59 | | | define("WEBSOCKET_PULLER_BIND_ADDR","127.0.0.1"); |
| 60 | | | define("WEBSOCKET_PULLER_PORT",4000); |
| 61 | | | |
| 62 | | | define("WEBSOCKET_BIND_ADDR","127.0.0.1"); |
| 63 | | | define("WEBSOCKET_PORT",1337); |
| 64 | | | |
| 65 | | | /** |
| 66 | | | * Defines address and port to which should the client side connect |
| 67 | | | * Example: wss://example.com:443 or ws://example.net:80 |
| 68 | | | */ |
| 69 | | | define("WEBSOCKET_CONNECT_URI","wss://example.com:443"); |
| 70 | | | |
| 71 | | | define("SITE_SUBDIR",""); |
| 72 | | | |
| 73 | | | define("CUSTOM_MAINFRAME",true); |
| 74 | | | |
| 75 | | | /* Mailer */ |
| 76 | | | define("MAILFROM_ADDRESS","root@example.com"); |
| 77 | | | |
| 78 | | | /* Enable/Disable link translating defined by LinkBuilder */ |
| 79 | | | if (!defined("REWRITE_LINKS")) |
| 80 | | | { |
| 81 | | | define("REWRITE_LINKS", false); |
| 82 | | | } |
| 83 | | | |
| 84 | | | /* Root directory of application */ |
| 85 | | | if (!defined("APP_DIR")) |
| 86 | | | { |
| 87 | | | define("APP_DIR",ROOT_DIR.DS.'Application'); |
| 88 | | | } |
| 89 | | | |
| 90 | | | define("DOCTRINE_DEVEL_MODE",true); |
| 91 | | | define("TWIG_DEVEL_MODE",true); |
| 92 | | | |
| 93 | | | define("APP_NAMESPACE",'FreenetRouter'); |
| 94 | | | define("APP_NAME",'FreenetRouter'); |
| 95 | | | |
| 96 | | | /* Controllers directory */ |
| 97 | | | define("CONTROLLER_DIR","Controllers"); |
| 98 | | | |
| 99 | | | define("RESOURCES_SYMLINK", APP_DIR.DS."Resources"); |
| 100 | | | |
| 101 | | | /* Resource directories */ |
| 102 | | | define("CSS_DIR_NAME", 'css'); |
| 103 | | | define("JS_DIR_NAME", 'javascript'); |
| 104 | | | define("IMG_DIR_NAME", 'images'); |
| 105 | | | |
| 106 | | | |
| 107 | | | define("CSS_DIR", RESOURCES_SYMLINK.DS.CSS_DIR_NAME); |
| 108 | | | define("JS_DIR", RESOURCES_SYMLINK.DS.JS_DIR_NAME); |
| 109 | | | define("IMG_DIR", RESOURCES_SYMLINK.DS.IMG_DIR_NAME); |
| 110 | | | define("TEMPLATE_DIR", APP_DIR.DS.'Templates'); |
| 111 | | | |
| 112 | | | /** debug and logs */ |
| 113 | | | //define("DEBUG",true); |
| 114 | | | |
| 115 | | | define("LOG_LEVEL", serialize(array('log','error', 'warning', 'accept', 'info'))); |
| 116 | | | |
| 117 | | | /* APPLICATION CUSTOM CONFIG */ |
| 118 | | | |
| 119 | | | /** defaults */ |
| 120 | | | define("DEFAULT_CONTROLLER", "Home"); |
| 121 | | | define("DEFAULT_TASK", "showPage"); |
| 122 | | | |
| 123 | | | /** security */ |
| 124 | | | define("LOGIN_REQUIRED", false); |
| 125 | | | define("LOGIN_POLICY", "DENY"); |
| 126 | | | |
| 127 | | | /** db connection */ |
| 128 | | | define("DB_HOST", "localhost"); |
| 129 | | | define("DB_DEFAULT_CONFIG",'default'); |
| 130 | | | |
| 131 | | | define("DB_CONFIG",serialize(array( |
| 132 | | | 'default' => array( |
| 133 | | | 'name' => 'mydatabase', |
| 134 | | | 'user' => 'myuser', |
| 135 | | | 'password' => 'mypasswd' |
| 136 | | | ) |
| 137 | | | ))); |
| 138 | | | |
| 139 | | | define("FPM_INJECT_PORT",9000); |
| 140 | | | define("FPM_INJECT_HTTP_HOST","localhost"); |
| 141 | | | |
| 142 | | | define("FPDF_FONTPATH", RUN_DIR.DS.'Font'.DS); |
| 143 | | | |
| 144 | | | mb_internal_encoding("UTF-8"); |