Internet Explorer is not supported. Please upgrade to a more modern browser.
Hello Samerton,
After updating my Debian system (apt get update && apt get upgrade), something happened to my website. It no longer loads, and I get the following error message: " Sorry! Sorry, but something went wrong while loading the page. Please contact an administrator. "
When I check the following file: /var/www/.../cache/logs/fatal-log.log I see the following message: [2024-07-31, 22:53:58] /var/www/.../core/classes/Minecraft/MCQuery.php(385): Cannot access offset of type string on string
What can I do to get it running again? According to the index.php file, I am using version 2.0.0-pr13.
Do I need to perform an upgrade? If so, where can I find instructions on how to do an upgrade?
Best regards, Firaman3D (Thank you for your great work!)
Sorry about the post over here.
Unfortunately, I can neither edit nor delete my own post.
My ajax_initialise.php
<?php
if (isset($_POST['perform']) && $_POST['perform'] == 'true') {
try {
if ($_GET['initialise'] === 'db') {
$message = PhinxAdapter::migrate();
$redirect_url = (($_SESSION['action'] == 'install') ? '?step=site_configuration' : '?step=upgrade');
$json = [
'message' => $language->get('installer', 'database_configured'),
'redirect_url' => $redirect_url,
];
if (!str_contains($message, 'All Done')) {
$json['error'] = $message;
} else {
$_SESSION['database_initialized'] = true;
}
} else {
if ($_GET['initialise'] === 'site') {
DatabaseInitialiser::runPreUser($conf);
$json = [
'success' => true,
'redirect_url' => '?step=admin_account_setup',
];
$_SESSION['site_initialized'] = true;
} else if ($_GET['initialise'] === 'upgrade') {
define('UPGRADE', true);
require(dirname(__DIR__) . '/includes/upgrade_perform.php');
$json = [
'success' => !isset($errors) || !count($errors),
'errors' => $errors ?? [],
'message' => $language->get('installer', 'upgrade_error'),
'redirect_url' => '?step=finish',
];
$_SESSION['admin_setup'] = true;
} else {
throw new RuntimeException('Invalid initialisation');
}
}
} catch (Exception $e) {
$json = [
'error' => true,
'message' => $e->getMessage(),
];
}
header('Content-Type: application/json');
echo json_encode($json);
die();
}
My database_initialization.php
<?php
if (isset($_SESSION['database_initialized']) && $_SESSION['database_initialized'] == true) {
Redirect::to('?step=site_configuration');
}
if (!isset($_SESSION['charset'])) {
Redirect::to('?step=database_configuration');
}
$scripts = [
'
<script><br /> $(document).ready(function() {<br /> $.post("?step=ajax_initialise&initialise=db", {perform: "true"}, function(response) {<br /> if (response.success) {<br /> window.location.replace(response.redirect_url);<br /> } else {<br /> if (response.error) {<br /> $("#info").parent().attr("class", "ui red message");<br /> $("#info").html(response.error);<br /> $("#continue-button").before("<button onclick=\"window.location.reload()\" class=\"ui small button\" id=\"reload-button\">' . $language->get('installer', 'reload') . '");<br /> } else if (response.redirect_url) {<br /> $("#info").html(response.message);<br /> $("#continue-button").attr("href", response.redirect_url);<br /> $("#continue-button").removeClass("disabled");<br /> }<br /> }<br /> });<br /> });<br /> </script>
'
];
?>
Hey Samerton,
I have played through the whole thing 5 times now without success.
It still does not seem to work for me.
During the installation the error from the picture appears.
and in the Fatal Error I get the following message:
[2022-07-25, 22:43:28] /var/www/settla/core/classes/Database/DB.php(151): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`nameless2`.`nl2_users_groups`, CONSTRAINT `nl2_users_groups_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `nl2_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)
I checked the file cache/logs/fatal-log.log for errors
[2022-07-24, 11:53:40] /var/www/settla/core/classes/Database/DB.php(151): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nameless2.nl2_phinxlog' doesn't exist
[2022-07-24, 11:53:59] /var/www/settla/core/classes/Database/DB.php(151): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nameless2.nl2_phinxlog' doesn't exist
[2022-07-24, 11:54:20] /var/www/settla/core/classes/Database/DB.php(151): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nameless2.nl2_settings' doesn't exist
[2022-07-24, 11:54:20] /var/www/settla/core/classes/Database/DB.php(151): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nameless2.nl2_phinxlog' doesn't exist
[2022-07-24, 11:54:22] /var/www/settla/core/classes/Database/DB.php(151): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nameless2.nl2_phinxlog' doesn't exist
[2022-07-24, 11:54:22] /var/www/settla/core/classes/Database/DB.php(151): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nameless2.nl2_phinxlog' doesn't exist
[2022-07-24, 11:55:17] /var/www/settla/core/classes/Database/DB.php(151): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nameless2.nl2_phinxlog' doesn't exist
[2022-07-24, 11:55:17] /var/www/settla/core/classes/Database/DB.php(151): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nameless2.nl2_phinxlog' doesn't exist
[2022-07-24, 11:57:52] /var/www/settla/core/classes/Database/DB.php(151): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nameless2.nl2_settings' doesn't exist
But i also did the following and it doesnt work