| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | // Global configuration file. |
|---|
| 4 | // This is just a sample file. Copy this over to config.php and edit. |
|---|
| 5 | |
|---|
| 6 | // Here is the essential configuration. You only need to modify this |
|---|
| 7 | // to get it working. |
|---|
| 8 | |
|---|
| 9 | // This is the subversion checkout directory. include trailing slash. |
|---|
| 10 | define("IA_ROOT_DIR", '--write-me-IA_ROOT_DIR--'); |
|---|
| 11 | |
|---|
| 12 | // Database host. Probably localhost. |
|---|
| 13 | define("IA_DB_HOST", '--write-me-IA_DB_HOST--'); |
|---|
| 14 | |
|---|
| 15 | // Database name. |
|---|
| 16 | define("IA_DB_NAME", '--write-me-IA_DB_NAME--'); |
|---|
| 17 | |
|---|
| 18 | // Database user. |
|---|
| 19 | define("IA_DB_USER", '--write-me-IA_DB_USER--'); |
|---|
| 20 | |
|---|
| 21 | // Database password |
|---|
| 22 | define("IA_DB_PASS", '--write-me-IA_DB_PASS--'); |
|---|
| 23 | |
|---|
| 24 | // Keep database connection alive when lost |
|---|
| 25 | define("IA_DB_KEEP_ALIVE", false); |
|---|
| 26 | |
|---|
| 27 | // Web host. This is probably localhost. no trailing slash here |
|---|
| 28 | define("IA_URL_HOST", "--write-me-IA_URL_HOST--"); |
|---|
| 29 | |
|---|
| 30 | // URL prefix, without the IA_URL_HOST part |
|---|
| 31 | // (only the part relative to the web server). |
|---|
| 32 | // Slashes at both ends. |
|---|
| 33 | define("IA_URL_PREFIX", "--write-me-IA_URL_PREFIX--"); |
|---|
| 34 | |
|---|
| 35 | // Define the place the avatars are being stored |
|---|
| 36 | define("IA_AVATAR_FOLDER", "--write-me-IA_AVATAR_FOLDER--"); |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | // Congratulations! You're done with the essential configuration. |
|---|
| 40 | // -------------------------------------------------------------- |
|---|
| 41 | // There are some more settings to adjust but they are optional. |
|---|
| 42 | |
|---|
| 43 | // Enable this when working on your own local copy. It gives you a few |
|---|
| 44 | // debugging & profiling tools. Additionally, it disables Google Analytics |
|---|
| 45 | // or other external resources. |
|---|
| 46 | define("IA_DEVELOPMENT_MODE", true); |
|---|
| 47 | |
|---|
| 48 | // Determine if script is runing in an HTTP environment. Otherwise it is |
|---|
| 49 | // probably running in CLI mode. Don't change it. |
|---|
| 50 | // FIXME: move to common/common.php |
|---|
| 51 | define("IA_HTTP_ENV", isset($_SERVER['REQUEST_URI'])); |
|---|
| 52 | |
|---|
| 53 | // SMF database prefix (required!) |
|---|
| 54 | define("IA_SMF_DB_PREFIX", 'ia_smf_'); |
|---|
| 55 | |
|---|
| 56 | // "The" url to infoarena home page. |
|---|
| 57 | define("IA_URL", IA_URL_HOST . IA_URL_PREFIX); |
|---|
| 58 | |
|---|
| 59 | // URL to SMF. No trailing slash |
|---|
| 60 | // Example: http://localhost/infoarena_smf |
|---|
| 61 | define("IA_SMF_URL", IA_URL . 'forum'); |
|---|
| 62 | |
|---|
| 63 | // cookie domain |
|---|
| 64 | // leave null when working on localhost |
|---|
| 65 | define("IA_COOKIE_DOMAIN", null); |
|---|
| 66 | |
|---|
| 67 | // infoarena session lifetime |
|---|
| 68 | // defaults to 5days |
|---|
| 69 | define("IA_SESSION_LIFETIME_SECONDS", 5*24*3600); |
|---|
| 70 | |
|---|
| 71 | // Fatal error mask. |
|---|
| 72 | // These are the errors the scripts halts on. |
|---|
| 73 | // E_ALL & ~ (E_USER_NOTICE | E_USER_WARNING) |
|---|
| 74 | // FIXME: Why isn't this configurable in php.ini? |
|---|
| 75 | define("IA_PHP_FATAL_ERROR_MASK", 0x19FF); |
|---|
| 76 | |
|---|
| 77 | // If this is true then the site is in debug. |
|---|
| 78 | // NOTE: set this to false when public. |
|---|
| 79 | define("IA_DEBUG_MODE", true); |
|---|
| 80 | |
|---|
| 81 | // This aren't really settings. |
|---|
| 82 | // FIXME: Couldn't find a better place to put this in. |
|---|
| 83 | // - NOTE: it can't reside in common/db/*.php files since SMF |
|---|
| 84 | // cannot link db api. |
|---|
| 85 | // - NOTE: it can't reside in www/* since judge needs it too |
|---|
| 86 | define("IA_TASK_TEXTBLOCK_PREFIX", 'problema/'); |
|---|
| 87 | define("IA_USER_TEXTBLOCK_PREFIX", 'utilizator/'); |
|---|
| 88 | define("IA_NEWSLETTER_TEXTBLOCK_PREFIX", 'newsletter/'); |
|---|
| 89 | // FIXME: Do we really need this? |
|---|
| 90 | define("IA_ROUND_TEXTBLOCK_PREFIX", 'runda/'); |
|---|
| 91 | |
|---|
| 92 | // Secret code |
|---|
| 93 | // Random string used as salt in various places where hashing is needed. |
|---|
| 94 | // For security reasons, this should be changed when uploading to a production |
|---|
| 95 | // website. |
|---|
| 96 | define("IA_SECRET", "developersetup"); |
|---|
| 97 | |
|---|
| 98 | // Mail setup |
|---|
| 99 | |
|---|
| 100 | // Enable this only if you have a SMTP server around |
|---|
| 101 | define("IA_SMTP_ENABLED", false); |
|---|
| 102 | |
|---|
| 103 | if (IA_SMTP_ENABLED) { |
|---|
| 104 | // only if SMTP is enabled, you can configure these |
|---|
| 105 | define("IA_SMTP_HOST", "localhost"); |
|---|
| 106 | define("IA_SMTP_PORT", "25"); |
|---|
| 107 | } |
|---|
| 108 | |
|---|
| 109 | // Disable mysql_unbuffered_query |
|---|
| 110 | define("IA_DB_MYSQL_UNBUFFERED_QUERY", false); |
|---|
| 111 | |
|---|
| 112 | // Enable the DB cache by default. |
|---|
| 113 | // If it's broken then you have a bug. |
|---|
| 114 | // Disabling it might still be usefull for mysql tweaking. |
|---|
| 115 | define("IA_ENABLE_DB_CACHE", true); |
|---|
| 116 | |
|---|
| 117 | // Enabled the create_function_cached cached. |
|---|
| 118 | // If false then create_function_cached_cached is the same as create_function_cached |
|---|
| 119 | define("IA_ENABLE_CREATE_FUNCTION_CACHE", true); |
|---|
| 120 | |
|---|
| 121 | |
|---|
| 122 | // Disable memory cache by default because it requires additional stuff |
|---|
| 123 | define("IA_MEM_CACHE_METHOD", "none"); |
|---|
| 124 | |
|---|
| 125 | // Default TTL for cache items. |
|---|
| 126 | define("IA_MEM_CACHE_EXPIRATION", 3600); |
|---|
| 127 | |
|---|
| 128 | // Round TTL. Smaller because of evaluator. |
|---|
| 129 | define("IA_MEM_CACHE_ROUND_EXPIRATION", 10); |
|---|
| 130 | |
|---|
| 131 | // Task TTL. Smaller because of evaluator. |
|---|
| 132 | define("IA_MEM_CACHE_TASK_EXPIRATION", 10); |
|---|
| 133 | |
|---|
| 134 | // TTL for tag caches. |
|---|
| 135 | define("IA_MEM_CACHE_TAGS_EXPIRATION", 600); |
|---|
| 136 | |
|---|
| 137 | // Logging options. Anything else in normal operation is a bug. |
|---|
| 138 | // Filling error_log on a production machine sucks. |
|---|
| 139 | |
|---|
| 140 | // If true then log all security checks. |
|---|
| 141 | // Warning: tons of output. |
|---|
| 142 | define("IA_LOG_SECURITY", false); |
|---|
| 143 | |
|---|
| 144 | // If true then log disk cache hits/misses |
|---|
| 145 | define("IA_LOG_DISK_CACHE", false); |
|---|
| 146 | |
|---|
| 147 | // If true then log mem cache hits/misses |
|---|
| 148 | define("IA_LOG_MEM_CACHE", false); |
|---|
| 149 | |
|---|
| 150 | // Log each and every SQL query. Not for the faint of heart. |
|---|
| 151 | define("IA_LOG_SQL_QUERY", false); |
|---|
| 152 | |
|---|
| 153 | // Try to EXPLAIN every select query, useful when optimizing. |
|---|
| 154 | define("IA_LOG_SQL_QUERY_EXPLAIN", false); |
|---|
| 155 | |
|---|
| 156 | // CAPTHCA Keys |
|---|
| 157 | define("IA_CAPTCHA_PUBLIC_KEY", "6LesuwQAAAAAAPHgdh9Hem1KJfvd5Ng1yRoIweio"); |
|---|
| 158 | define("IA_CAPTCHA_PRIVATE_KEY", "6LesuwQAAAAAAF3FUPWFGQD1xPITFagjqWUO9Urs"); |
|---|
| 159 | |
|---|
| 160 | ?> |
|---|