File/config/path.inc.php

Description

StockManiac Path Configuration File

This file contains all paths necessary to find classes and libraries. The code itself relies on the constants defined here.

Normaly end users do *not* need to make adjustments in here. Packagers, however, may produce patches against this file if necessary.

Further down are 'internal' settings which may be of interest for developers. Please do not change them without knowing the code.

Includes
 require_once ('stockmaniac.inc.php') (line 178)
 require_once (PATH_STOCKMANIACCONFIG) (line 176)

load installation specific settings

Constants
DEBUG_FAILED_QUERY = false (line 103)

debug failed sql queries

  • _never_ enable in production!

DEBUG_SLOW_QUERY = false (line 96)

debug slow sql queries

  • false means disabled
  • a floating number is taken as max exec time in seconds
  • _never_ enable in production!

FILE_UPLOAD_INEFFICIENCY = 4.5 (line 78)

file upload code inefficiency

  • this is how often we copy file data in memory during the upload process
  • 'memory_limit' (in php.ini) must be this factor multiplied by whatever file size you want to upload
  • ie: 2.5 * 5 MByte file size = 12.5 MByte required memory
  • do *not* change this factor unless you know the code behind it

LIB_XMLRPC_EPI_UTILS = 'xmlrpc-epi-utils.inc.php' (line 66)

various libraries (we can not get loaded via __autoload())

PATH_CACHE = '/tmp/StockManiac' (line 51)

path constants

PATH_CONFIG = PATH_ROOT.'config' (line 52)
PATH_EXTERNAL = PATH_ROOT.'external_packages' (line 54)
PATH_LIB = PATH_ROOT.'lib' (line 55)
PATH_LOCALE = PATH_ROOT.'locale' (line 56)
PATH_PLUGINS = PATH_ROOT.'plugins' (line 53)
PATH_ROOT = false (line 28)

local install directory

  • absolute path to the StockManiac installation
  • 'false' makes StockManiac work with relative paths
  • a trailing slash (/) is essential!

PATH_STOCKMANIACCONFIG = false (line 46)

end user configuration file

  • should be an absolute path
  • 'false' makes StockManiac assume it is called stockmaniac.inc.php and PHP can locate it through its include path list

PATH_TEMPLATES = PATH_ROOT.'templates' (line 58)
PATH_TEMPLATES_C = PATH_ROOT.'templates_c' (line 59)
PATH_TEST = PATH_ROOT.'test' (line 60)
PATH_THEMES = PATH_ROOT.'themes' (line 57)
PATH_WEBROOT = _MAGIC_PATH (line 135)

define the webroot

  • use the magic path if available
  • if webroot is not given, give it a try - likely it wont work

TEST_BASEURL = 'http://localhost/~ste/stockmaniac/gui' (line 88)
TEST_DATABASE = 'stockmaniac_unittest' (line 84)

database to be used to run unit tests

TEST_DATABASE_SCHEMA = 'install.d/mysql-structure.sql' (line 85)
_MAGIC_PATH = $up (line 123)

create the magic path to find stuff relativly

  • assumes that the current working directory is at (or below) the installation directory
  • assumes further that PATH_LIB contains the class files

Functions
__autoload (line 156)

autoload not-yet-loaded classes or testcases

  • requires PHP5
  • whether a class or a testcase is loaded is determined by matching $classname against the testcase naming convention

void __autoload (string $classname)
  • string $classname

Documentation generated on Sun, 22 Aug 2010 11:20:23 +0200 by phpDocumentor 1.4.3