PageRenderTime 50ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/Zikula-1.2.3/config/config.php

#
PHP | 162 lines | 77 code | 15 blank | 70 comment | 2 complexity | b1faa4f03c75bda307e0a34d7bdf3e3a MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, BSD-3-Clause
  1. <?php
  2. /**
  3. * Zikula Application Framework
  4. *
  5. * @copyright (c) 2002, Zikula Development Team
  6. * @link http://www.zikula.org
  7. * @version $Id: config.php 26908 2009-10-12 13:14:24Z drak $
  8. * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9. * @package Zikula_Core
  10. */
  11. // ----------------------------------------------------------------------
  12. // NOTICE
  13. // Zikula includes an install script which can populate the database
  14. // and write this config file automatically. There is normally no need
  15. // to manually edit this file!
  16. // ----------------------------------------------------------------------
  17. // ----------------------------------------------------------------------
  18. // Database & System Config
  19. //
  20. // dbtype: type of database, can be mysql, mysqli, mssql, oci8, or oracle
  21. // dbtabletype: type of table for MySQL database, MyISAM, INNODB
  22. // dbhost: Database Hostname
  23. // dbuname: Username
  24. // dbpass: Password
  25. // dbname: Database Name
  26. // encoded: 0 for username/password information plaintext
  27. // 1 for username/password information base64 encoded
  28. // pconnect: 0 use connect
  29. // 1 use pconnect
  30. // ----------------------------------------------------------------------
  31. //
  32. // ----------------------------------------------------------------------
  33. // The following define some global settings for the application
  34. // ----------------------------------------------------------------------
  35. global $PNConfig;
  36. $PNConfig['System']['installed'] = 0; // installer will change this during installation
  37. $PNConfig['System']['tabletype'] = 'myisam'; // installer will change this during installation
  38. $PNConfig['System']['temp'] = '/var/lib/zikula/pnTemp'; // installer will change this during installation
  39. $PNConfig['System']['prefix'] = 'z'; // installer will change this during installation
  40. $PNConfig['System']['development'] = 0; // should be set to 0/false when cutting a release for production use
  41. $PNConfig['System']['default_timezone'] = 'GMT'; // TZ timezone
  42. // ----------------------------------------------------------------------
  43. // This is the definition for the default Zikula system database.
  44. // It *must* be named 'default'!
  45. // ----------------------------------------------------------------------
  46. $PNConfig['DBInfo']['default']['dbtype'] = 'mysql';
  47. $PNConfig['DBInfo']['default']['dbhost'] = 'localhost';
  48. $PNConfig['DBInfo']['default']['dbuname'] = '';
  49. $PNConfig['DBInfo']['default']['dbpass'] = '';
  50. $PNConfig['DBInfo']['default']['dbname'] = '';
  51. $PNConfig['DBInfo']['default']['encoded'] = 1;
  52. $PNConfig['DBInfo']['default']['pconnect'] = 0;
  53. $PNConfig['DBInfo']['default']['dbtabletype'] = 'innodb';
  54. $PNConfig['DBInfo']['default']['dbcharset'] = 'utf8'; // changed from 'latin1'!
  55. // ----------------------------------------------------------------------
  56. // Please consult the MySQL documentation for valid character set names!
  57. // 'UTF-8' = 'utf8'
  58. // ----------------------------------------------------------------------
  59. // ----------------------------------------------------------------------
  60. // The following define the list of databases the system can access. You
  61. // can define as many as you like provided you give each one a unique
  62. // name (the key value following the DBInfo array element)
  63. // ----------------------------------------------------------------------
  64. $PNConfig['DBInfo']['external1']['dbtype'] = 'mssql'; // sample value
  65. $PNConfig['DBInfo']['external1']['dbhost'] = 'otherhost1'; // sample value
  66. $PNConfig['DBInfo']['external1']['dbuname'] = '';
  67. $PNConfig['DBInfo']['external1']['dbpass'] = '';
  68. $PNConfig['DBInfo']['external1']['dbname'] = 'pntest'; // sample value
  69. $PNConfig['DBInfo']['external1']['encoded'] = 1;
  70. $PNConfig['DBInfo']['external1']['pconnect'] = 0;
  71. $PNConfig['DBInfo']['external1']['dbtabletype'] = 'innodb';
  72. $PNConfig['DBInfo']['external1']['dbcharset'] = 'utf8';
  73. // additional DB can be configured here ...
  74. $PNConfig['DBInfo']['external2']['dbtype'] = 'oracle'; // sample value
  75. $PNConfig['DBInfo']['external2']['dbhost'] = 'otherhost2'; // sample value
  76. $PNConfig['DBInfo']['external2']['dbuname'] = '';
  77. $PNConfig['DBInfo']['external2']['dbpass'] = '';
  78. $PNConfig['DBInfo']['external2']['dbname'] = 'integration'; // sample value
  79. $PNConfig['DBInfo']['external2']['encoded'] = 1;
  80. $PNConfig['DBInfo']['external2']['pconnect'] = 0;
  81. $PNConfig['DBInfo']['external2']['dbtabletype'] = 'innodb';
  82. $PNConfig['DBInfo']['external2']['dbcharset'] = 'utf8';
  83. // and so on ...
  84. // ----------------------------------------------------------------------
  85. // Debugging/Tracing settings
  86. // ----------------------------------------------------------------------
  87. $PNConfig['Debug']['debug'] = 0; //
  88. $PNConfig['Debug']['pagerendertime'] = 0; // display page render time, 0 to disable
  89. $PNConfig['Debug']['sql_adodb'] = 0; // adodb debug flag, generates lots of print output
  90. $PNConfig['Debug']['sql_count'] = 0; // count sql statements, 0 to disable
  91. $PNConfig['Debug']['sql_time'] = 0; // time sql statements, 0 to disable
  92. $PNConfig['Debug']['sql_detail'] = 0; // collect executed sql statements, 0 to disable
  93. $PNConfig['Debug']['sql_data'] = 0; // collect selected data, 0 to disable
  94. $PNConfig['Debug']['sql_user'] = 0; // user filter, 0 for all, any other number is a user-id, can also be an array
  95. // ----------------------------------------------------------------------
  96. // Error Reporting
  97. // ----------------------------------------------------------------------
  98. $PNConfig['Debug']['error_reporting_development'] = E_ALL; // preconfigured level
  99. $PNConfig['Debug']['error_reporting_production'] = E_ALL & ~E_NOTICE & ~E_WARNING; // preconfigured level
  100. $PNConfig['Debug']['debug_key'] = ($PNConfig['System']['development'] ? 'error_reporting_development' : 'error_reporting_production');
  101. error_reporting($PNConfig['Debug'][$PNConfig['Debug']['debug_key']]); // now set the appropriate level
  102. // ----------------------------------------------------------------------
  103. // Logging Settings
  104. // ----------------------------------------------------------------------
  105. $PNConfig['Log']['log_enabled'] = 0; // global logging to on/off switch for 'log_dest' (0=off, 1=on)
  106. $PNConfig['Log']['log_dest'] = 'FILE'; // the default logging destination. Can be "FILE", "PRINT", "EMAIL" or "DB".
  107. $PNConfig['Log']['log_dir'] = $PNConfig['System']['temp'] . '/error_logs/'; // the directory containing all log files
  108. $PNConfig['Log']['log_file'] = $PNConfig['Log']['log_dir'] . 'zikula-%s.log'; // %s is where todays date will go
  109. $PNConfig['Log']['log_file_uid'] = 0; // wether or not a separate log file is used for each user. The filename is derived from $PNConfig['Log']['log_file']
  110. $PNConfig['Log']['log_file_date_format'] = 'Ymd'; // dateformat to be used for the generated log filename
  111. $PNConfig['Log']['log_maxsize'] = 1.0; // value in MB. Decimal is OK. (Use 0 for no limit)
  112. $PNConfig['Log']['log_user'] = 0; // user filter for logging, 0 for all, can also be an array
  113. $PNConfig['Log']['log_levels'] = array('CORE', 'DB', 'DEFAULT', 'WARNING', 'FATAL', 'STRICT'); // User defined. To get everything use: $log_level = array("All");
  114. $PNConfig['Log']['log_show_errors'] = true; // Show php logging errors on screen (Use while developing only)
  115. $PNConfig['Log']['log_date_format'] = "Y-m-d H:i:s"; // 2006-07-19 18:41:50
  116. $PNConfig['Log']['log_level_dest'] = array('DB' => 'PRINT'); // array of level-specific log destinations
  117. $PNConfig['Log']['log_level_files'] = array('DB' => $PNConfig['System']['temp'] . '/error_logs/zikula-sql-%s.log'); // array of level-specific log files (only used if destination=="FILE")
  118. $PNConfig['Log']['log_keep_days'] = 30; // amount of days to keep log files for (older files will be erased)
  119. $PNConfig['Log']['log_apache_uname'] = 0; // log username to apache logs: please see documentation. Please check you country's local law covering the logging of personally identifiable user data before enabling.
  120. // ----------------------------------------------------------------------
  121. // The following define some data layer settings
  122. // ----------------------------------------------------------------------
  123. $PNConfig['System']['PN_CONFIG_USE_OBJECT_ATTRIBUTION'] = 0; // enable universal attribution layer, 0 to turn off
  124. $PNConfig['System']['PN_CONFIG_USE_OBJECT_CATEGORIZATION'] = 1; // categorization/filtering services, 0 to turn off
  125. $PNConfig['System']['PN_CONFIG_USE_OBJECT_LOGGING'] = 0; // object audit trail logging, 0 to turn off
  126. $PNConfig['System']['PN_CONFIG_USE_OBJECT_META'] = 0; // meta-data services, 0 to turn off
  127. $PNConfig['System']['PN_CONFIG_USE_TRANSACTIONS'] = 0; // run request as a transaction, 0 to turn off
  128. // ----------------------------------------------------------------------
  129. // Initialize runtime variables to sane defaults
  130. // ----------------------------------------------------------------------
  131. global $PNRuntime;
  132. $PNRuntime['sql'] = array();
  133. $PNRuntime['sql_count_request'] = 0;
  134. $PNRuntime['sql_time_request'] = 0;
  135. // ----------------------------------------------------------------------
  136. // Multisites configuration
  137. // ----------------------------------------------------------------------
  138. if (is_readable('config/multisites_config.php')) {
  139. require_once 'config/multisites_config.php';
  140. }
  141. // ----------------------------------------------------------------------
  142. // if there is a personal_config.php in the folder where is config.php
  143. // we add it. (This HAS to be at the end, after all initialization.)
  144. // ----------------------------------------------------------------------
  145. if (is_readable('config/personal_config.php')) {
  146. require_once 'config/personal_config.php';
  147. }