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['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:
55: if (empty($xoopsOption['hascommon'])) {
56: $xoopsOption['nocommon'] = true;
57: session_start();
58: }
59: @include '../mainfile.php';
60: if (!defined('XOOPS_ROOT_PATH')) {
61: define('XOOPS_ROOT_PATH', str_replace("\\", '/', realpath('../')));
62: }
63:
64: 65: 66: 67: 68: 69: 70: 71:
72:
73: date_default_timezone_set(@date_default_timezone_get());
74: include './class/installwizard.php';
75: include_once '../include/version.php';
76: include_once './include/functions.php';
77: include_once '../class/module.textsanitizer.php';
78: include_once '../class/libraries/vendor/autoload.php';
79:
80: $pageHasHelp = false;
81: $pageHasForm = false;
82:
83: $wizard = new XoopsInstallWizard();
84: if (!$wizard->xoInit()) {
85: exit();
86: }
87:
88: if (!@is_array($_SESSION['settings'])) {
89: $_SESSION['settings'] = array();
90: }
91: