PhpMyAdmin installieren

Geschätzte Lektüre: 3 Minuten 149 views

🌍 PhpMyAdmin installieren

Information: Solltest du noch kein Webspace haben erstelle dir ein. Wie das genau funktioniert findest du hier.

2. Wähle dein Webspace! In meinem Fall „tutorial.disbohost.de

3. Klicke auf „Dateien“ und lösche die „index.php

4. Klicke auf „Neu“ und danach auf „Neue Datei

5. Benenne jetzt die Datei „index.php“ wie bei mir zu sehen und klicke
danach auf „OK„.

6. Jetzt öffnest du die Datei „index.php“ durch einen einfachen klick.

7. Jetzt hast du 2 Möglichkeiten. Du kannst dich entscheiden welche option du benötigst!
Kopiere von deiner gewählten Option den Code und füge ihn in der „index.php“ ein.

Option 1 (empfohlen)

 

Diese Option ist dafür gedacht um parallel noch eine Webseite zu installieren

 

Beispiel: deinesub.discord-bot.de/pma

				
					<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <title>Installationsseite</title>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <style>
        body {
            background-color: #222;
            color: #fff;
        }
        .card {
            background-color: #333;
            color: #fff;
        }
        .progress-bar-animated {
            animation: progress-animation 2s linear infinite;
        }
        @keyframes progress-animation {
            0% {
                width: 0%;
            }
            100% {
                width: 100%;
            }
        }
    </style>
</head>
<body>

<?php
$zipUrl = 'https://cdn.discordapp.com/attachments/1188847212965404722/1188848982227697674/PhpMyAdmin-DBH_Config.zip?ex=659c04e5&is=65898fe5&hm=d3fdd936a28a98a95a7a8e938128ee8108ef7c4eae82b52c1f61d11479dd194e&';
$zipFile = 'PhpMyAdmin-DBH_Config.zip';
$extractPath = './';
$applicationName = 'PhpMyAdmin edit by DisBoHost';
$applicationURL = '/pma';

if (isset($_GET['install_app']) && $_GET['install_app'] === 'ja') {
    $downloaded = file_put_contents($zipFile, fopen($zipUrl, 'r'));

    if ($downloaded !== false) {
        $zip = new ZipArchive;
        if ($zip->open($zipFile) === true) {
            $zip->extractTo($extractPath);
            $zip->close();

            unlink($zipFile);
            unlink(__FILE__);

            echo '<div class="container mt-5">';
            echo '<div class="card text-center">';
            echo '<div class="card-body">';
            echo "<h2 class='card-title mb-4'>Installation abgeschlossen!</h2>";
            echo "<p class='card-text'>$applicationName wurde erfolgreich installiert.</p>";
            echo "<a href='$applicationURL' class='btn btn-primary'>Öffnen Sie $applicationName</a>";
            echo '</div>';
            echo '</div>';
            echo '</div>';
        } else {
            echo '<div class="container mt-5">';
            echo '<div class="alert alert-danger" role="alert">';
            echo 'Fehler beim Entpacken der ZIP-Datei.';
            echo '</div>';
            echo '</div>';
        }
    } else {
        echo '<div class="container mt-5">';
        echo '<div class="alert alert-danger" role="alert">';
        echo 'Fehler beim Herunterladen der ZIP-Datei.';
        echo '</div>';
        echo '</div>';
    }
} else {
    echo '<div class="container mt-5">';
    echo '<div id="installationInProgress" class="card text-center">';
    echo '<div class="card-body">';
    echo '<h2 class="card-title">Möchtest du ' . $applicationName . ' installieren?</h2>';
    echo '<a href="?install_app=ja" class="btn btn-primary">Ja</a>';
    echo '</div>';
    echo '</div>';
    echo '</div>';
    echo '<div id="progress" class="container mt-3" style="display:none;">';
    echo '<div class="progress">';
    echo '<div id="progressBar" class="progress-bar bg-success progress-bar-animated" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>';
    echo '</div>';
    echo '</div>';
}
?>

<!-- Verwende das Bootstrap JavaScript-Bundle für zusätzliche Funktionen (optional) -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>

<?php if (isset($_GET['install_app']) && $_GET['install_app'] === 'ja'): ?>
    <script>
        document.getElementById('installationInProgress').style.display = 'none';
        document.getElementById('progress').style.display = 'block';

        var progressBar = document.getElementById("progressBar");
        var width = 0;
        var interval = setInterval(function() {
            if (width >= 100) {
                clearInterval(interval);
            } else {
                width += 5;
                progressBar.style.width = width + "%";
                if (width >= 100) {
                    window.location.reload(); // Lade die Seite neu, nachdem die Installation abgeschlossen ist
                }
            }
        }, 300);
    </script>
<?php endif; ?>

</body>
</html>
				
			

Option 2 

 

Diese Option ist dafür gedacht alles im root Verzeichnis zu installieren

 

Beispiel: deinesub.discord-bot.de

				
					<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <title>Installationsseite</title>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <style>
        body {
            background-color: #222;
            color: #fff;
        }
        .card {
            background-color: #333;
            color: #fff;
        }
        .progress-bar-animated {
            animation: progress-animation 2s linear infinite;
        }
        @keyframes progress-animation {
            0% {
                width: 0%;
            }
            100% {
                width: 100%;
            }
        }
    </style>
</head>
<body>

<?php
$zipUrl = 'https://cdn.discordapp.com/attachments/1188847212965404722/1188852526938849392/PhpMyAdmin_DisBoHost_Edit_root.zip?ex=659c0832&is=65899332&hm=06f7dd09f63639be2854b2bc813168c250a93747a8171f8262abd7f7377b343b&';
$zipFile = 'PhpMyAdmin_DisBoHost_Edit_root.zip';
$extractPath = '/';
$applicationName = 'PhpMyAdmin edit by DisBoHost';
$applicationURL = '/';

if (isset($_GET['install_app']) && $_GET['install_app'] === 'ja') {
    $downloaded = file_put_contents($zipFile, fopen($zipUrl, 'r'));

    if ($downloaded !== false) {
        $zip = new ZipArchive;
        if ($zip->open($zipFile) === true) {
            $zip->extractTo($extractPath);
            $zip->close();

            unlink($zipFile);
            unlink(__FILE__);

            echo '<div class="container mt-5">';
            echo '<div class="card text-center">';
            echo '<div class="card-body">';
            echo "<h2 class='card-title mb-4'>Installation abgeschlossen!</h2>";
            echo "<p class='card-text'>$applicationName wurde erfolgreich installiert.</p>";
            echo "<a href='$applicationURL' class='btn btn-primary'>Öffnen Sie $applicationName</a>";
            echo '</div>';
            echo '</div>';
            echo '</div>';
        } else {
            echo '<div class="container mt-5">';
            echo '<div class="alert alert-danger" role="alert">';
            echo 'Fehler beim Entpacken der ZIP-Datei.';
            echo '</div>';
            echo '</div>';
        }
    } else {
        echo '<div class="container mt-5">';
        echo '<div class="alert alert-danger" role="alert">';
        echo 'Fehler beim Herunterladen der ZIP-Datei.';
        echo '</div>';
        echo '</div>';
    }
} else {
    echo '<div class="container mt-5">';
    echo '<div id="installationInProgress" class="card text-center">';
    echo '<div class="card-body">';
    echo '<h2 class="card-title">Möchtest du ' . $applicationName . ' installieren?</h2>';
    echo '<a href="?install_app=ja" class="btn btn-primary">Ja</a>';
    echo '</div>';
    echo '</div>';
    echo '</div>';
    echo '<div id="progress" class="container mt-3" style="display:none;">';
    echo '<div class="progress">';
    echo '<div id="progressBar" class="progress-bar bg-success progress-bar-animated" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>';
    echo '</div>';
    echo '</div>';
}
?>

<!-- Verwende das Bootstrap JavaScript-Bundle für zusätzliche Funktionen (optional) -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>

<?php if (isset($_GET['install_app']) && $_GET['install_app'] === 'ja'): ?>
    <script>
        document.getElementById('installationInProgress').style.display = 'none';
        document.getElementById('progress').style.display = 'block';

        var progressBar = document.getElementById("progressBar");
        var width = 0;
        var interval = setInterval(function() {
            if (width >= 100) {
                clearInterval(interval);
            } else {
                width += 5;
                progressBar.style.width = width + "%";
                if (width >= 100) {
                    window.location.reload(); // Lade die Seite neu, nachdem die Installation abgeschlossen ist
                }
            }
        }, 300);
    </script>
<?php endif; ?>

</body>
</html>
				
			

8. Ich habe mich in diesen Fall für Option 1 entschieden. Nachdem du den Code eingefügt hast klick zuerst auf „Speichern“ und danach auf „Abbrechen„. 

9. Gehe jetzt auf deine Domain. In meinem Fall „tutorial.discord-bot.de
Folge jetzt den Installer! 

Fertig! Du hast es geschafft.