LATL Systemdiagnostik
Dette værktøj tester forskellige aspekter af dit LATL-system for at identificere eventuelle problemer.
1. PHP Information
PHP Version: 8.3.6
PHP Extensions: Alle nødvendige extensions er installeret
GD Version: 2.3.3
FreeType Support: Ja
JPEG Support: Ja
PNG Support: Ja
WebP Support: Ja
2. Filstruktur-kontrol
Filstruktur: Manglende filer: admin/band_editor.php, admin/layout-editor.php
Upload-mapper: Alle upload-mapper er skrivbare
3. Database-forbindelse
Database-forbindelse: Forbundet til databasen
Antal bånd i databasen: 3
Antal konfigurationer i databasen: 3
4. Klasse-kontrol
Klasse-kontrol: Alle nødvendige klasser er tilgængelige
Database-klasse: Fungerer korrekt
ImageHandler-klasse: Kan instantieres
5. Fejlfinding af band_editor.php
band_editor.php: Filen blev ikke fundet eller er ikke læsbar
6. Fejlfinding af design-editor.php
design-editor.php: Filen findes og er læsbar
Filstørrelse: 54686 bytes
Ingen almindelige syntaksfejl fundet
<?php
// admin/design-editor.php - Editor til global styling, farveskema og typografi
require_once __DIR__ . '/../includes/config.php';
require_once __DIR__ . '/../includes/db.php';
// Starter sessio...
7. PHP Lint-check
PHP Lint-check:
Syntaksfejl fundet:admin/band_editor.php:Filen blev ikke fundet eller er ikke læsbar
8. Anbefalinger og løsningsforslag
Problemer og løsninger:
- Manglende filer: admin/band_editor.php, admin/layout-editor.php
Løsning: Upload de manglende filer til serveren. - PHP syntaksfejl:
- admin/band_editor.php: Filen blev ikke fundet eller er ikke læsbar
Løsning: Ret syntaksfejlene i de pågældende filer.
Simpel implementering:
Her er en meget enkel version af band_editor.php, som du kan prøve at uploade og teste:
<?php
// Aktivér fejlvisning
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once __DIR__ . '/../includes/config.php';
require_once __DIR__ . '/../includes/db.php';
// Start session
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
// Check login
if (!isset($_SESSION['admin_authenticated']) || $_SESSION['admin_authenticated'] !== true) {
header('Location: index.php');
exit;
}
// Hent bånd-data
$page_id = isset($_GET['page']) ? $_GET['page'] : 'forside';
$edit_id = isset($_GET['edit']) ? (int)$_GET['edit'] : null;
$band_data = null;
if ($edit_id) {
$db = Database::getInstance();
$band = $db->selectOne("SELECT * FROM layout_bands WHERE id = ?", [$edit_id]);
if ($band) {
$band_data = $band;
$band_data['band_content'] = json_decode($band_data['band_content'], true);
}
}
?>
<!DOCTYPE html>
<html lang="da">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simpel Bånd-editor</title>
<style>
body { font-family: sans-serif; margin: 0; padding: 20px; }
.container { max-width: 1200px; margin: 0 auto; }
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; }
input, select, textarea { width: 100%; padding: 8px; box-sizing: border-box; }
button { padding: 10px 15px; background: #042940; color: white; border: none; cursor: pointer; }
</style>
</head>
<body>
<div class="container">
<h1>Simpel Bånd-editor</h1>
<?php if ($band_data): ?>
<form method="post" action="band_editor.php">
<input type="hidden" name="action" value="save">
<input type="hidden" name="page_id" value="<?= htmlspecialchars($page_id) ?>">
<input type="hidden" name="band_id" value="<?= $band_data['id'] ?>">
<input type="hidden" name="band_type" value="<?= htmlspecialchars($band_data['band_type']) ?>">
<div class="form-group">
<label>Bånd-type:</label>
<strong><?= htmlspecialchars($band_data['band_type']) ?></strong>
</div>
<div class="form-group">
<label for="band_height">Højde (1-4):</label>
<input type="number" id="band_height" name="band_height" min="1" max="4" value="<?= $band_data['band_height'] ?>">
</div>
<div class="form-group">
<label for="band_content">Indhold (JSON):</label>
<textarea id="band_content" name="band_content" rows="10"><?= htmlspecialchars(json_encode($band_data['band_content'], JSON_PRETTY_PRINT)) ?></textarea>
</div>
<div class="form-group">
<button type="submit">Gem ændringer</button>
<a href="layout-editor.php?page=<?= urlencode($page_id) ?>">Annuller</a>
</div>
</form>
<?php else: ?>
<p>Intet bånd fundet med ID <?= $edit_id ?>.</p>
<a href="layout-editor.php?page=<?= urlencode($page_id) ?>">Tilbage til layout-editor</a>
<?php endif; ?>
</div>
</body>
</html>
Du kan kopiere denne kode og uploade den som admin/simple_band_editor.php, og derefter tilgå den via:
https://new.leatherandthelikes.dk/admin/simple_band_editor.php?page=forside&edit=1
9. Upload-test
Upload-test: Filupload fungerer korrekt
10. Webserver-information
Server software: Apache/2.4.58 (Ubuntu)
Document root: /var/www/new.leatherandthelikes.dk
Script filename: /var/www/new.leatherandthelikes.dk/test.php
Server name: new.leatherandthelikes.dk
Script path: /var/www/new.leatherandthelikes.dk