-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.php
67 lines (61 loc) · 1.98 KB
/
install.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
<?php
/**
* TomatoCMS
*
* LICENSE
*
* This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.gnu.org/licenses/gpl-2.0.txt
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @copyright Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
* @version $Id: install.php 1275 2010-02-23 07:30:20Z huuphuoc $
* @since 2.0.1
*/
if (version_compare(phpversion(), '5.2.0', '<') === true) {
die('ERROR: Your PHP version is '.phpversion().'. TomatoCMS requires PHP 5.2.0 or newer.');
}
error_reporting(E_ALL);
define('DS', DIRECTORY_SEPARATOR);
define('PS', PATH_SEPARATOR);
define('TOMATO_ROOT_DIR', dirname(__FILE__));
define('TOMATO_APP_DIR', TOMATO_ROOT_DIR . DS . 'app');
define('TOMATO_LIB_DIR', TOMATO_ROOT_DIR . DS . 'lib');
define('TOMATO_TEMP_DIR', TOMATO_ROOT_DIR . DS . 'temp');
set_include_path(PS
. TOMATO_LIB_DIR . PS
. get_include_path());
/**
* Run the installer
* Use Zend_Application
* @since 2.0.3
*/
require_once 'Zend/Application.php';
$application = new Zend_Application(
'production',
array(
'phpsettings' => array(
'display_startup_errors' => 1,
'display_errors' => 1,
),
'bootstrap' => array(
'path' => TOMATO_APP_DIR. DS . 'Installer.php',
'class' => 'Tomato_Installer',
),
'resources' => array(
'frontController' => array(
'controllerDirectory' => TOMATO_APP_DIR . DS . 'controllers',
'moduleDirectory' => TOMATO_APP_DIR. DS . 'modules',
'plugins' => array(
'magicQuote' => 'Tomato_Core_Controller_Plugin_MagicQuote',
),
),
),
)
);
$application->bootstrap()->run();