ActionApps PHP Cross Reference Groupware Applications

Source: /include/config.php3 - 363 lines - 16080 bytes - Summary - Text - Print

Description: Application wide configuration options

   1  <?php
   2  /**
   3   * Application wide configuration options
   4   *
   5   * This is the ActionApps main configuration file. In fact, this file is a PHP
   6   * script which is included into every AA page, thus, php syntax is used.
   7   * This basically means that this file defines constants in the form:
   8   *
   9   *        $name = "value";
  10   *    or in the form
  11   *        define("name", "value);
  12   *
  13   *
  14   * PHP versions 4 and 5
  15   *
  16   * LICENSE: This program is free software; you can redistribute it and/or modify
  17   * it under the terms of the GNU General Public License as published by
  18   * the Free Software Foundation; either version 2 of the License, or
  19   * (at your option) any later version.
  20   *
  21   * This program is distributed in the hope that it will be useful,
  22   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24   * GNU General Public License for more details.
  25   *
  26   * You should have received a copy of the GNU General Public License
  27   * along with this program (LICENSE); if not, write to the Free Software
  28   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  29   *
  30   * @version   $Id: config.php3 2803 2009-04-16 11:19:04Z honzam $
  31   * @license   http://opensource.org/licenses/gpl-license.php GNU Public License
  32   * @copyright Copyright (C) 1999, 2000 Association for Progressive Communications
  33   * @link      http://www.apc.org/ APC
  34   *
  35  */
  36  
  37  /** AA_SITE_PATH defines the webserver's home directory. It must be an absolute
  38   *  path from the root. Make sure to terminate this path with a slash!
  39   *  Fill in the correct value between the quotes.
  40   *  It normaly looks like:
  41   *  define('AA_SITE_PATH', "/home/httpd/html/");
  42   */
  43  define('AA_SITE_PATH', "/home/httpd/html/");
  44  
  45  
  46  /** AA_BASE_DIR defines AA directory under AA_SITE_PATH where is AA installed.
  47   *  If you concaternate AA_SITE_PATH and AA_BASE_DIR, you should get absolute
  48   *  path from root to AA directory (where file slice.php3 is in).
  49   *  Make sure to terminate this path with a slash!
  50   *  Example:
  51   *  define('AA_BASE_DIR', "apc-aa/");
  52   */
  53  define('AA_BASE_DIR', "apc-aa/"); // AA_BASE_DIR is only used in this file so that
  54                                    // a single change is required for multiple AA
  55                                    // versions
  56  
  57  
  58  /** AA_INSTAL_PATH is server url relative path to base AA directory
  59   *  You need to change this option only if your AA directory accessible through
  60   *  Apache webserver differ from AA_BASE_DIR (for example if you install AA to
  61   *  apc-aa-2.6.0 directory and then create defgine aa -> apc-aa-2.6.0 in Apache.
  62   */
  63  define('AA_INSTAL_PATH', "/".AA_BASE_DIR);  // you can left it as it is
  64  
  65  
  66  /** Domain in which you want to run AA admin interface - in which domain we can
  67   *  find AA directory
  68   *  Make sure to terminate this path with a slash!
  69   *  Example:
  70   *  define('AA_HTTP_DOMAIN', "http://aa.apc.org/");
  71   */
  72  define('AA_HTTP_DOMAIN', "http://my.domain.org/");
  73  
  74  
  75  /** ID of AA (any unique 32chars long hexadecimal number)
  76   *  Please change this value to be unique - use any random hexadecimal number
  77   *  You MUST set it before you run setup.php3 script - you can't change it later
  78   *  bacause AA superadmin permission is joined with this number
  79   */
  80  define("AA_ID", "990111222333444555666777888999A9");
  81  
  82  /** Organization name
  83   *  It should be also world unique - it is important to have it unique mainly
  84   *  if you plan exchange articles between servers
  85   *  (@see http://apc-aa.sourceforge.net/faq/index.shtml#241)
  86   */
  87  define("ORG_NAME","An APC Member");
  88  
  89  
  90  /** DB Access Configuration */
  91  define("DB_HOST",    "my.domain.org"); // server on which the database (MySQL) is
  92                                         // often you can use "localhost" here
  93  define("DB_NAME",    "aadb");          // Name of database
  94  define("DB_USER",    "aadbuser");      // User name for database access
  95  define("DB_PASSWORD","test.pw");       // Database password
  96  define("DB_TYPE",    "db_mysql");      // you can (in theory) use also another
  97                                         // databases like db_odbc, db_mssql, ...
  98  
  99  /** Page shown on database error
 100   *  If you do not specify this page, then some default error messages are
 101   *  displayed. It is good for debuging, but it is better to not show this
 102   *  messages to user on production server for security reasons */
 103  //    define("DB_ERROR_PAGE", "http://example.org/out-of-service.php");
 104  
 105  
 106  /** MySQL 4.1 is able to use different character sets for the communication.
 107   *  Standard for MySQL client communication in PHP5 is UTF (probably), but if
 108   *  you are using another character sets (maybe for historical reason), then you
 109   *  need to specify it by "SET CHARACTER SET" and "SET COLLATION_CONNECTION" SQL
 110   *  commands. Just set the right values to following variables.
 111   *  We use (for czech character set "Windows 1250"):
 112   *     define("DB_CHARACTER_SET", "cp1250");
 113   *     define("DB_COLLATION_CONNECTION", "cp1250_czech_cs");
 114   *  Default is: commented out
 115   */
 116  define("DB_CHARACTER_SET", "cp1250");
 117  define("DB_COLLATION_CONNECTION", "cp1250_czech_cs");
 118  
 119  
 120  /** Use MySQL non-persistent database connect (mysql_connect())
 121   *  or the persistent one?
 122   *  Persistent connection should be better for most servers, but if you have
 123   *  experience troubles in MySQL connection, use non-persistent connections
 124   *  see http://cz.php.net/manual/en/function.mysql-pconnect.php
 125   *  Default value: true
 126   */
 127  define('AA_USE_NON_PERSISTENT_CONNECT', false);
 128  
 129  /** Permissions system settings
 130   *  Select permission system (exactly one of "dummy", "ldap", "sql")
 131   *  default is "sql" - all user permissions are stored in sql database.
 132   *  You probably do not need to change this setting
 133   */
 134  define("PERM_LIB", "sql");
 135  
 136  /** LDAP Configuration
 137  *  You need to configure it only if you use "ldap" permission system
 138  *  (@see PERM_LIB above)
 139  */
 140  // define("LDAP_HOST",   "localhost");
 141  // define("LDAP_BINDDN", "cn=aauser,ou=AA");
 142  // define("LDAP_BINDPW", "somepasswd");  // password
 143  // define("LDAP_BASEDN", "ou=AA");
 144  // define("LDAP_PEOPLE", "ou=People,ou=AA");
 145  // define("LDAP_GROUPS", "ou=AA");
 146  // define("LDAP_ACLS",   "ou=ACLs,ou=AA");
 147  // define("LDAP_PORT",   389);            // standard LDAP port: 389
 148  
 149  /** Default language file
 150   *  Language files are stored in include/lang/ directory. At this time you can
 151   *  use any *_news_lang.php3, where '*' is one of cz, de, en, es, ja, ro, sk
 152   *  ( @see http://apc-aa.sourceforge.net/faq/index.shtml#1180 )
 153   */
 154  define("DEFAULT_LANG_INCLUDE", "en-utf8_news_lang.php3");
 155  
 156  /** e-mail for bug reporting contact */
 157  define("ERROR_REPORTING_EMAIL", "webmaster@my.domain.org");
 158  
 159  /** PHP error reporting
 160   *  Should PHP display Errors? It is good to switch it off on production server
 161   */
 162  // error_reporting(0);  // Turn off all error reporting
 163  // error_reporting(E_ALL ^ E_NOTICE); // This is the default value set in php.ini
 164  
 165  /** e-mail for Alerts management */
 166  define("ALERTS_EMAIL", "aaadmin@somewhere.com");
 167  
 168  /** Queue script run duration (in seconds)
 169   *  How long could run the script, which goes through queued tasks and executes
 170   *  them (toexecute class - used for Alerts mail sending, ...).
 171   *  Default value is 16.0 [second] */
 172  define('TOEXECUTE_ALLOWED_TIME', 59.0);
 173  
 174  /** File uploads settings
 175   *  The directory for file uploads should be webserver writeable and it
 176   *  shouldn't be inside AA directory (for security reasons - PHP script upload)
 177   *  ( @see http://apc-aa.sourceforge.net/faq/index.shtml#fileupload )
 178   *  ( @see http://apc-aa.sourceforge.net/faq/index.shtml#1118 )
 179   */
 180  /**  max size of file in file/picture uploading */
 181  define("IMG_UPLOAD_MAX_SIZE", "400000");
 182  /** url to image/file directory */
 183  define("IMG_UPLOAD_URL", AA_HTTP_DOMAIN."img_upload/");
 184  /** path from server root to image/file directory */
 185  define("IMG_UPLOAD_PATH", AA_SITE_PATH."img_upload/");
 186  /** mkdir perms - AA creates new directory for each slice in image/file upload
 187  *  directory specified above. Each slice then have its own subdirectory.
 188  *  Default is 774 */
 189  define("IMG_UPLOAD_DIR_MODE",  octdec('0774'));
 190  /** perms for uploaded file. If not specified, the permissions are left, as
 191  *  is after the upload (based on configuration of your server
 192  *  Default is: commented out */
 193  // define('IMG_UPLOAD_FILE_MODE', octdec('0664'));
 194  
 195  /** Maximum size of files included by {include(file)} inline alias */
 196  define("INCLUDE_FILE_MAX_SIZE", "400000");
 197  
 198  //-----------------------------------------------------------------------------
 199  // Folloving section contains not so important config options and you will
 200  // probably left it as it is
 201  
 202  /** number of shown pages links in scroller's navigation bar */
 203  define("SCROLLER_LENGTH", 3);
 204  
 205  /** Select color profile for administation pages */
 206  // WebNetworks profile (green - default)
 207  define("COLOR_TABBG",     "#A8C8B0");           // background of tables
 208  define("COLOR_TABTITBG",  "#589868");           // background of table titles
 209  define("COLOR_BACKGROUND","#F5F0E7");           // admin pages background
 210                                // you can redefine the colors in styles too
 211  define("ADMIN_CSS",       "admin.css");         // style for admin interface
 212  define("ADM_SLICE_CSS",   "adm_slice.css");     // style for public view of
 213                                                // not encapsulated slices
 214  
 215  /* ## IGC profile ##
 216  define("COLOR_TABBG",     "#A8C8B0");           // background of tables
 217  define("COLOR_TABTITBG",  "#589868");           // background of table titles
 218  define("COLOR_BACKGROUND","#F5F0E7");           // admin pages background
 219                                // you can redefine the colors in styles too
 220  define("ADMIN_CSS",       "admin-igc.css");     // style for admin interface
 221  define("ADM_SLICE_CSS",   "adm_slice-igc.css"); // style for public view of
 222                                                // not encapsulated slices */
 223  
 224  /* ## Comlink profile ##
 225  define("COLOR_TABBG",     "#A8C8B0");           // background of tables
 226  define("COLOR_TABTITBG",  "#589868");           // background of table titles
 227  define("COLOR_BACKGROUND","#F5F0E7");           // admin pages background
 228                                // you can redefine the colors in styles too
 229  define("ADMIN_CSS",       "admin-cml.css");     // style for admin interface
 230  define("ADM_SLICE_CSS",   "adm_slice-cml.css"); // style for public view of
 231                                                // not encapsulated slices */
 232  
 233  /* ## Econnects profile ##
 234  define("COLOR_TABBG",     "#EBDABE");           // background of tables
 235  define("COLOR_TABTITBG",  "#584011");           // background of table titles
 236  define("COLOR_BACKGROUND","#F5F0E7");           // admin pages background
 237                                // you can redefine the colors in styles too
 238  define("ADMIN_CSS",       "admin-ecn.css");     // style for admin interface
 239  define("ADM_SLICE_CSS",   "adm_slice.css");     // style for public view of
 240                                                // not encapsulated slices */
 241  
 242  /** Page cache setting
 243   *  pages with items/views/slices/sites are automaticaly cached by AA
 244   *  The caching system is quite smart - it caches only unchanged pages.
 245   *  However, You can switch caching off. */
 246  define( "ENABLE_PAGE_CACHE", true );
 247  
 248  /** CACHE_TTL defines the time in seconds the page will be stored in cache
 249  *  (Time To Live) - in fact it can be infinity because of automatic cache
 250  *  flushing on page change (but then there will be problem with item
 251  *  expiration). Typically this is 600, i.e. 10 minutes, but 1 day (86400)
 252  *  makes for faster serving
 253  *  See: http://actionapps.org/en/Troubleshooting_and_Optimization#Caching
 254  */
 255  define("CACHE_TTL", 10800 ); // 3 hours
 256  
 257  
 258  /** Convertors - you can install it and then use
 259   *  Just uncomment and fill the right path and convert option will be shown
 260   *  above any textarea in inputform, where you allow HTML
 261   */
 262    // $CONV_HTMLFILTERS = array( ".doc" => "/usr/local/bin/wvHtml",
 263    //                            ".pdf" => "/usr/local/bin/pdftohtml",
 264    //                            ".xls" => "/usr/bin/xlhtml",
 265    //                            ".ppt" => "/usr/bin/ppthtml",
 266    //                            "iconv"=> "/usr/bin/iconv" );
 267    // define(CONV_DEFAULTENCODING,'windows-1250');   // default output encoding
 268    // define(CONV_SYSTEMENCODING,'utf-8');
 269  
 270  /** If true, the expired items could be displayed by in specific query
 271   *  (good for archive display). If false, expired items are never shown */
 272  define("ALLOW_DISPLAY_EXPIRED_ITEMS", true);
 273  
 274  /** Maximum number of items, which can be related to some item */
 275  define( "MAX_RELATED_COUNT", 128 );
 276  
 277  /** set this directive to 1 if you want to data-entry forms to have only
 278   *  one column */
 279  define("SINGLE_COLUMN_FORM", "0");
 280  
 281  /** Since v1.8 you can use short id for item identification
 282   *  (x instead of sh_itm) */
 283  $USE_SHORT_URL = true;
 284  
 285  //-----------------------------------------------------------------------------
 286  // Following section just prepares some constants
 287  // You probably do not need to change this
 288  
 289  define('AA_BASE_PATH',     AA_SITE_PATH. AA_BASE_DIR);        // do not change
 290  define('AA_INC_PATH' ,     AA_BASE_PATH. "include/");         // do not change
 291  define('AA_PHPTHUMB_PATH', AA_BASE_PATH. "misc/phpThumb/");   // do not change
 292  
 293  if ( !defined('AA_BASE_PATH') OR (strlen(AA_BASE_PATH) < 1)) {
 294      echo "you must set AA_INC_PATH and other variables in config.php3 !";
 295  }
 296  
 297  
 298  /** set this directive to true, if your php already auto-includes phplib
 299   * if it is 'false' and it should be true you'll get an error like:
 300   *       Fatal error: DB_Sql is already a function or class in
 301   *                    /var/php/phplib/php/db_mysql.inc on line 12    */
 302  define("PHPLIB_ALREADY_LOADED", false);
 303  
 304  /** PHPLib is the part of AA since v >2.2.0. Do not need to care about PHPLib */
 305  define('PHPLIB_LIBDIR', AA_INC_PATH.'phplib/');    // do not change
 306  
 307  /** URL of aa instalation */
 308  define("AA_INSTAL_URL", AA_HTTP_DOMAIN. substr(AA_INSTAL_PATH,1));    // do not change
 309  
 310  /** URL of index of help files for AA */
 311  define("DOCUMENTATION_URL", "http://actionapps.org/aa/doc");
 312  
 313  /** developer SITE_CONFIG
 314   *  Note: developers can put their site-specific config in SITE_CONFIG
 315   *  Only the first define() has any effect.
 316   *  Therefore, if constants are defined in SITE_CONFIG and also defined
 317   *  in the //add new CONSTANTS section, the second definitions do not take hold.
 318   *
 319   *  Switches here are based on SERVER_ADDR so that all virtual hosts
 320   *  can be configured in one place
 321   */
 322  /*
 323    switch ($SERVER_ADDR) {
 324      case "209.220.30.175":
 325      case "209.220.30.171":
 326        define (SITE_CONFIG, "config-cyborganic.inc"); break;
 327    }
 328  
 329    if (defined ("SITE_CONFIG")) {
 330      // require does not work as expected inside control structures!
 331      include (AA_INC_PATH . SITE_CONFIG);
 332    }
 333  */
 334  
 335  /** Filemanager is special feature which allows you to modify static files right
 336   *  inside AA admin interface.
 337   *  It's not necessary to configure it here, if you don't plan to use it.
 338   *  ( @see http://apc-aa.sourceforge.net/faq/index.shtml#1106 )
 339   *  ( @see http://apc-aa.sourceforge.net/faq/index.shtml#fileman )
 340   */
 341  /** mkdir perms, set by variable because constants don't work with octal
 342  *  values */
 343  define('FILEMAN_MODE_DIR', octdec('0770'));
 344  /** create file perms */
 345  define('FILEMAN_MODE_FILE', octdec('0664'));
 346  /** in this directory individual slice directories and directory "templates"
 347  *  are created  */
 348  define("FILEMAN_BASE_DIR",AA_SITE_PATH."apc-aa-files/");
 349  /** URL path to the base directory */
 350  define("FILEMAN_BASE_URL",AA_HTTP_DOMAIN."apc-aa-files/");
 351  /** time in seconds to allow to upload big files */
 352  define("FILEMAN_UPLOAD_TIME_LIMIT", 600);
 353  
 354  /** XMGETTEXT language files - this setting is needed only for AA developers
 355   *  who want to run xmgettext (see misc/mgettext/index.php3). */
 356  $XMGETTEXT_DESTINATION_DIR = "/www/php_rw/lang/";
 357  
 358  /** MAILMAN synchronization dir. In this directory are placed the
 359   * files with lists of email addresses which processes mailman.
 360   * The dir must exist, it is not created by the mailman.php3 script.
 361   * ( @see http://apc-aa.sourceforge.net/faq/index.shtml#email )   */
 362  $MAILMAN_SYNCHRO_DIR = "/www/mailman/";
 363  ?>

title

Description

title

Description

title

Description

title

title

Body