blob: 18d3b4b76ff3c460a16e739c345a850571bf6866 [file] [log] [blame]
darwineld8bef8a2014-02-11 20:13:22 +01001<?php
darwineld8bef8a2014-02-11 20:13:22 +01002defined('BASEPATH') OR exit('No direct script access allowed');
Derek Allard2067d1a2008-11-13 22:59:24 +00003
4/*
5|--------------------------------------------------------------------------
Andrey Andreev0d60a212015-08-13 13:14:59 +03006| Display Debug backtrace
7|--------------------------------------------------------------------------
8|
9| If set to TRUE, a backtrace will be displayed along with php errors. If
10| error_reporting is disabled, the backtrace will not display, regardless
11| of this setting
12|
13*/
14defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);
15
16/*
17|--------------------------------------------------------------------------
Derek Allard2067d1a2008-11-13 22:59:24 +000018| File and Directory Modes
19|--------------------------------------------------------------------------
20|
21| These prefs are used when checking and setting modes when working
Derek Jones37f4b9c2011-07-01 17:56:50 -050022| with the file system. The defaults are fine on servers with proper
Derek Allard2067d1a2008-11-13 22:59:24 +000023| security, but you may wish (or even need) to change the values in
24| certain environments (Apache running a separate process for each
Derek Jones37f4b9c2011-07-01 17:56:50 -050025| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
Derek Allard2067d1a2008-11-13 22:59:24 +000026| always be used to set the mode correctly.
27|
28*/
Andrey Andreev0d60a212015-08-13 13:14:59 +030029defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
30defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
31defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
32defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);
Derek Allard2067d1a2008-11-13 22:59:24 +000033
34/*
35|--------------------------------------------------------------------------
36| File Stream Modes
37|--------------------------------------------------------------------------
38|
39| These modes are used when working with fopen()/popen()
40|
41*/
Andrey Andreev0d60a212015-08-13 13:14:59 +030042defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
43defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
44defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
Andrey Andreev05268d62016-01-13 15:59:42 +020045defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
Andrey Andreev0d60a212015-08-13 13:14:59 +030046defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
47defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
48defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
49defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
Timothy Warren9a902cb2011-10-18 04:06:29 -040050
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -070051/*
52|--------------------------------------------------------------------------
53| Exit Status Codes
54|--------------------------------------------------------------------------
55|
56| Used to indicate the conditions under which the script is exit()ing.
57| While there is no universal standard for error codes, there are some
Daniel Hunsaker50dfe012013-03-04 02:05:20 -070058| broad conventions. Three such conventions are mentioned below, for
Andrey Andreev0760a442013-09-23 13:59:46 +030059| those who wish to make use of them. The CodeIgniter defaults were
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -070060| chosen for the least overlap with these conventions, while still
61| leaving room for others to be defined in future versions and user
Daniel Hunsaker50dfe012013-03-04 02:05:20 -070062| applications.
Andrey Andreev0760a442013-09-23 13:59:46 +030063|
Daniel Hunsaker50dfe012013-03-04 02:05:20 -070064| The three main conventions used for determining exit status codes
65| are as follows:
66|
67| Standard C/C++ Library (stdlibc):
68| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
69| (This link also contains other GNU-specific conventions)
70| BSD sysexits.h:
71| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
72| Bash scripting:
73| http://tldp.org/LDP/abs/html/exitcodes.html
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -070074|
75*/
Andrey Andreev0d60a212015-08-13 13:14:59 +030076defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors
77defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
78defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
79defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
80defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
81defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
82defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
83defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
84defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
85defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code