2
0

Settings.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <?php
  2. /**
  3. * The settings file contains all of the basic settings that need to be present when a database/cache is not available.
  4. *
  5. * Simple Machines Forum (SMF)
  6. *
  7. * @package SMF
  8. * @author Simple Machines http://www.simplemachines.org
  9. * @copyright 2013 Simple Machines and individual contributors
  10. * @license http://www.simplemachines.org/about/smf/license.php BSD
  11. *
  12. * @version 2.1 Alpha 1
  13. */
  14. ########## Maintenance ##########
  15. /**
  16. * The maintenance "mode"
  17. * Set to 1 to enable Maintenance Mode, 2 to make the forum untouchable. (you'll have to make it 0 again manually!)
  18. * 0 is default and disables maintenance mode.
  19. * @var int 0, 1, 2
  20. * @global int $maintenance
  21. */
  22. $maintenance = 0;
  23. /**
  24. * Title for the Maintenance Mode message.
  25. * @var string
  26. * @global int $mtitle
  27. */
  28. $mtitle = 'Maintenance Mode';
  29. /**
  30. * Description of why the forum is in maintenance mode.
  31. * @var string
  32. * @global string $mmessage
  33. */
  34. $mmessage = 'Okay faithful users...we\'re attempting to restore an older backup of the database...news will be posted once we\'re back!';
  35. ########## Forum Info ##########
  36. /**
  37. * The name of your forum.
  38. * @var string
  39. */
  40. $mbname = 'My Community';
  41. /**
  42. * The default language file set for the forum.
  43. * @var string
  44. */
  45. $language = 'english';
  46. /**
  47. * URL to your forum's folder. (without the trailing /!)
  48. * @var string
  49. */
  50. $boardurl = 'http://127.0.0.1/smf';
  51. /**
  52. * Email address to send emails from. (like [email protected].)
  53. * @var string
  54. */
  55. $webmaster_email = '[email protected]';
  56. /**
  57. * Name of the cookie to set for authentication.
  58. * @var string
  59. */
  60. $cookiename = 'SMFCookie11';
  61. ########## Database Info ##########
  62. /**
  63. * The database type
  64. * Default options: mysql, sqlite, postgresql
  65. * @var string
  66. */
  67. $db_type = 'mysql';
  68. /**
  69. * The server to connect to (or a Unix socket)
  70. * @var string
  71. */
  72. $db_server = 'localhost';
  73. /**
  74. * The database name
  75. * @var string
  76. */
  77. $db_name = 'smf';
  78. /**
  79. * Database username
  80. * @var string
  81. */
  82. $db_user = 'root';
  83. /**
  84. * Database password
  85. * @var string
  86. */
  87. $db_passwd = '';
  88. /**
  89. * Database user for when connecting with SSI
  90. * @var string
  91. */
  92. $ssi_db_user = '';
  93. /**
  94. * Database password for when connecting with SSI
  95. * @var string
  96. */
  97. $ssi_db_passwd = '';
  98. /**
  99. * A prefix to put in front of your table names.
  100. * This helps to prevent conflicts
  101. * @var string
  102. */
  103. $db_prefix = 'smf_';
  104. /**
  105. * Use a persistent database connection
  106. * @var int|bool
  107. */
  108. $db_persist = 0;
  109. /**
  110. *
  111. * @var int|bool
  112. */
  113. $db_error_send = 0;
  114. ########## Cache Info ##########
  115. /**
  116. * Select a cache system. You want to leave this up to the cache area of the admin panel for
  117. * proper detection of apc, eaccelerator, memcache, mmcache, output_cache, smf, or xcache
  118. * (you can add more with a mod).
  119. * @var string
  120. */
  121. $cache_accelerator = '';
  122. /**
  123. * The level at which you would like to cache. Between 0 (off) through 3 (cache a lot).
  124. * @var int
  125. */
  126. $cache_enable = 0;
  127. /**
  128. * This is only used for memcache / memcached. Should be a string of 'server:port,server:port'
  129. * @var array
  130. */
  131. $cache_memcached = '';
  132. /**
  133. * This is only for the 'smf' file cache system. It is the path to the cache directory.
  134. * It is also recommended that you place this in /tmp/ if you are going to use this.
  135. * @var string
  136. */
  137. $cachedir = dirname(__FILE__) . '/cache';
  138. ########## Directories/Files ##########
  139. # Note: These directories do not have to be changed unless you move things.
  140. /**
  141. * The absolute path to the forum's folder. (not just '.'!)
  142. * @var string
  143. */
  144. $boarddir = dirname(__FILE__);
  145. /**
  146. * Path to the Sources directory.
  147. * @var string
  148. */
  149. $sourcedir = dirname(__FILE__) . '/Sources';
  150. /**
  151. * Path to the Packages directory.
  152. * @var string
  153. */
  154. $packagesdir = dirname(__FILE__) . '/Packages';
  155. ########## Error-Catching ##########
  156. # Note: You shouldn't touch these settings.
  157. if (file_exists(dirname(__FILE__) . '/db_last_error.php'))
  158. include(dirname(__FILE__) . '/db_last_error.php');
  159. if (!isset($db_last_error))
  160. {
  161. // File does not exist so lets try to create it
  162. file_put_contents(dirname(__FILE__) . '/db_last_error.php', '<' . '?' . "php\n" . '$db_last_error = 0;' . "\n" . '?' . '>');
  163. $db_last_error = 0;
  164. }
  165. if (file_exists(dirname(__FILE__) . '/install.php'))
  166. {
  167. header('Location: http' . (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 's' : '') . '://' . (empty($_SERVER['HTTP_HOST']) ? $_SERVER['SERVER_NAME'] . (empty($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT']) : $_SERVER['HTTP_HOST']) . (strtr(dirname($_SERVER['PHP_SELF']), '\\', '/') == '/' ? '' : strtr(dirname($_SERVER['PHP_SELF']), '\\', '/')) . '/install.php'); exit;
  168. }
  169. # Make sure the paths are correct... at least try to fix them.
  170. if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt'))
  171. $boarddir = dirname(__FILE__);
  172. if (!file_exists($sourcedir) && file_exists($boarddir . '/Sources'))
  173. $sourcedir = $boarddir . '/Sources';
  174. if (!file_exists($cachedir) && file_exists($boarddir . '/cache'))
  175. $cachedir = $boarddir . '/cache';
  176. ?>