Core API
3.5.1. Constants
Constants normally define paths and database information. These values are global and cannot be changed when they are first defined. This is why constants are used for such vital information.
These constants are defined by either init.php or scripts included from that script.
Notice: Constants in italics may be set in a script prior to inclusion of init.php so they are optional.
|
Constant |
Defined in |
Description |
Avail. in FE |
|---|---|---|---|
|
TYPO3_OS |
init.php |
Operating systen; Windows = "WIN", other = "" (presumed to be some sort of Unix) |
YES |
|
TYPO3_MODE |
init.php |
Mode of TYPO3: Set to either "FE" or "BE" depending on frontend or backend execution. So in "init.php" and "thumbs.php" this value is "BE" |
YES value = "FE" |
|
PATH_thisScript |
init.php |
Abs. path to current script. |
YES |
|
TYPO3_mainDir |
init.php |
This is the directory of the backend administration for the sites of this TYPO3 installation. Hardcoded to "typo3/". Must be a subdirectory to the website. See elsewhere for descriptions on how to change the default admin directory, "typo3/", to something else. |
YES |
|
PATH_typo3 |
init.php |
Abs. path of the TYPO3 admin dir (PATH_site + TYPO3_mainDir). |
- |
|
PATH_typo3_mod |
init.php |
Relative path (from the PATH_typo3) to a properly configured module. Based on TYPO3_MOD_PATH. |
- |
|
PATH_site |
init.php |
Abs. path to directory with the frontend (one directory above PATH_typo3) |
YES |
|
PATH_t3lib |
init.php |
Abs. path to "t3lib/" (general TYPO3 library) within the TYPO3 admin dir |
YES |
|
PATH_typo3conf |
init.php |
Abs. TYPO3 configuration path (local, not part of source) Must be defined in order for "t3lib/config_default.php" to return! |
YES |
|
TYPO3_db |
config_default.php |
Name of the database, for example "t3_coreinstall". Is defined after the inclusion of "typo3conf/localconf.php" (same for the other TYPO3_* constants below |
YES |
|
TYPO3_db_username |
config_default.php |
Database username |
YES |
|
TYPO3_db_password |
config_default.php |
Database password |
YES |
|
TYPO3_db_host |
config_default.php |
Database hostname, eg. "localhost" |
YES |
|
TYPO3_tables_script |
config_default.php |
By default "t3lib/stddb/tables.php" is included as the main table definition file. Alternatively this constant can be set to the filename of an alternative "tables.php" file. Must be located in "typo3conf/" Depricated. Make Extensions instead. |
YES |
|
TYPO3_extTableDef_script |
config_default.php |
Name of a php-include script found in "typo3conf/" that contains php-code that further modifies the variables set by "t3lib/stddb/tables.php" Depricated. Make Extensions instead. |
YES |
|
TYPO3_languages |
config_default.php |
Defines the system language keys in TYPO3s backend. |
YES |
|
TYPO3_DLOG |
config_default.php |
If true, calls to t3lib_div::devLog() can be made in both frontend and backend; This is event logging which can help to track debugging in general. |
YES |
|
TYPO3_MOD_PATH |
[prior to init.php] |
Path to module relative to PATH_typo3 (as defined in the module configuration). Must be defined prior to "init.php". |
- |
|
TYPO3_enterInstallScript |
[prior to init.php] |
If defined and set true the Install Tool is activated and the script exits after that. Used in "typo3/install/index.php":
Example:
define('TYPO3_enterInstallScript', '1'); |
- |
|
TYPO3_PROCEED_IF_NO_USER |
[prior to init.php] |
If defined and set true the "init.php" script will return to the parent script even if no backend user was authenticated!
This constant is set by for instance the "index.php" script so it can include "init.php" and still show the login form:
define("TYPO3_PROCEED_IF_NO_USER", 1); require ("init.php");
Please be very careful with this feature - use it only when you have total control of what you are doing! |
- |
|
TYPO3_cliMode |
[prior to init.php] |
Initiates CLI (Command Line Interface) mode. This is used when you want a shell executable PHP script to initialize a TYPO3 backend. For more details see section about "Initialize TYPO3 backend in a PHP shell script" in "Inside TYPO3" |
|
|
TYPO3_version |
config_default.php |
The TYPO3 version: x.x.x for released versions, x.x.x-dev for development versions leading up to releases x.x.x-bx for beta-versions |
YES |