forked from Xtraball/Siberian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug.php
68 lines (52 loc) · 1.54 KB
/
debug.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
* SiberianCMS
*
* @version 4.1.0
* @author Xtraball SAS <[email protected]>
*
* @development fast-env switch
*
*/
if(!file_exists("./config.php")) {
copy("./config.sample.php", "./config.php");
}
require_once "./config.php";
if(!isset($_config["debug"]) || !$_config["debug"]) {
die;
}
set_time_limit(300);
ini_set('max_execution_time', 300);
umask(0);
setlocale(LC_MONETARY, 'en_US');
/** @deprecated from 4.1.0, as we support only linux/unix based servers, this isn't necessary */
defined('DS')
|| define('DS', DIRECTORY_SEPARATOR);
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__)."/app"));
/** Defining ENV globally */
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', $_config["environment"]);
/** Sourcing default libs */
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH."/../lib"),
)));
require_once "Zend/Application.php";
/** Initializing the application */
$ini = is_readable(APPLICATION_PATH."/configs/app.ini") ? APPLICATION_PATH."/configs/app.ini" : APPLICATION_PATH."/configs/app.sample.ini";
$application = new Zend_Application(
$_config["environment"],
array(
"config" => array(
$ini,
APPLICATION_PATH."/configs/resources.cachemanager.ini",
),
)
);
$config = new Zend_Config($application->getOptions(), true);
Zend_Registry::set('config', $config);
Zend_Registry::set('_config', $_config);
session_cache_limiter(false);
/** Running */
$application->bootstrap();
Siberian_Debug::handle();