1: | <?php
|
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: | define('INSTALL_USER', '');
|
32: | define('INSTALL_PASSWORD', '');
|
33: |
|
34: | define('XOOPS_INSTALL', 1);
|
35: |
|
36: | function fatalPhpErrorHandler($e = null) {
|
37: | $messageFormat = '<br><div>Fatal %s %s file: %s : %d </div>';
|
38: | $exceptionClass = '\Exception';
|
39: | $throwableClass = '\Throwable';
|
40: | if ($e === null) {
|
41: | $lastError = error_get_last();
|
42: | if ($lastError !== null && $lastError['type'] === E_ERROR) {
|
43: |
|
44: | printf($messageFormat, 'Error', $lastError['message'], $lastError['file'], $lastError['line']);
|
45: | }
|
46: | } elseif ($e instanceof $exceptionClass || $e instanceof $throwableClass) {
|
47: |
|
48: | printf($messageFormat, get_class($e), $e->getMessage(), $e->getFile(), $e->getLine());
|
49: | }
|
50: | }
|
51: | register_shutdown_function('fatalPhpErrorHandler');
|
52: | set_exception_handler('fatalPhpErrorHandler');
|
53: |
|
54: | $options = array(
|
55: | 'lifetime' => 0,
|
56: | 'path' => '/',
|
57: | 'domain' => null,
|
58: | 'secure' => false,
|
59: | 'httponly' => true,
|
60: | 'samesite' => 'strict',
|
61: | );
|
62: |
|
63: | if (empty($xoopsOption['hascommon'])) {
|
64: | $xoopsOption['nocommon'] = true;
|
65: | if (PHP_VERSION_ID >= 70300) {
|
66: | session_set_cookie_params($options);
|
67: | }
|
68: |
|
69: | session_start();
|
70: |
|
71: | if (PHP_VERSION_ID < 70300) {
|
72: | require_once __DIR__ . '/../../include/xoopssetcookie.php';
|
73: | xoops_setcookie(session_name(), session_id(), $options);
|
74: | }
|
75: |
|
76: | }
|
77: |
|
78: | @include __DIR__ . '/../../mainfile.php';
|
79: | if (!defined('XOOPS_ROOT_PATH')) {
|
80: | define('XOOPS_ROOT_PATH', str_replace("\\", '/', realpath('../')));
|
81: | }
|
82: |
|
83: | date_default_timezone_set(@date_default_timezone_get());
|
84: | include __DIR__ . '/../class/installwizard.php';
|
85: | include_once __DIR__ . '/../../include/version.php';
|
86: | require_once __DIR__ . '/../../include/xoopssetcookie.php';
|
87: | include_once __DIR__ . '/../include/functions.php';
|
88: | include_once __DIR__ . '/../../class/module.textsanitizer.php';
|
89: | include_once __DIR__ . '/../../class/libraries/vendor/autoload.php';
|
90: |
|
91: | $pageHasHelp = false;
|
92: | $pageHasForm = false;
|
93: |
|
94: | $wizard = new XoopsInstallWizard();
|
95: | if (!$wizard->xoInit()) {
|
96: | exit();
|
97: | }
|
98: |
|
99: | if (!isset($_SESSION['settings']) || !is_array($_SESSION['settings'])) {
|
100: | $_SESSION['settings'] = array();
|
101: | }
|
102: | |