Skip to content

PHP Installation

Angeheftet PHP
  • Installation PHP 7.3 , Debian Buster 10

    Als erstes mal ein

    apt update && apt upgrade
    

    danach

    apt install php7.3-common php7.3-mysql php7.3-opcache php7.3-readline php7.3-xml php7.3-xsl php7.3-zip
    apt install php7.3-cli php7.3-curl php7.3-gd php7.3-geoip php7.3-intl php7.3-json php7.3-mbstring
    apt install php-fpm
    

    Testen

    root@rockpro64:~# php -v
    PHP 7.3.11-1~deb10u1 (cli) (built: Oct 26 2019 14:14:18) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.3.11-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
    
  • Für Debian 11 Bullseye

    apt install php7.4-common php7.4-mysql php7.4-opcache php7.4-readline php7.4-xml php7.4-xsl php7.4-zip
    apt install php7.4-cli php7.4-curl php7.4-gd php7.4-geoip php7.4-intl php7.4-json php7.4-mbstring php7.4-redis
    apt install php7.4-bcmath php7.4-gmp php7.4-imagick
    apt install php-fpm
    
  • Falls jemand auch die Warnung in Joomla! bezüglich der php Version 7.4 loswerden möchte, installiert kein php8.1. Damit habe ich eine dicke Fehlermeldung. Es müssen wohl sämtliche Erweiterungen und Templates 8.1 unterstützen, was wohl derzeit noch nicht der Fall ist. Nehmt 8.0, das läuft bei mir aktuell.

    apt install php8.0-common php8.0-mysql php8.0-opcache php8.0-readline php8.0-xml php8.0-xsl php8.0-zip
    apt install php8.0-cli php8.0-curl php8.0-gd php8.0-intl php8.0-mbstring php8.0-redis
    apt install php8.0-bcmath php8.0-gmp php8.0-imagick
    apt install php8.0-fpm
    

  • PHP - ChatGPT

    PHP
    1
    0 Stimmen
    1 Beiträge
    63 Aufrufe
    Niemand hat geantwortet
  • PHP Webseite lokal einhängen mit sshfs

    PHP
    1
    0 Stimmen
    1 Beiträge
    39 Aufrufe
    Niemand hat geantwortet
  • PHP Data Objects

    Linux
    4
    0 Stimmen
    4 Beiträge
    271 Aufrufe
    FrankMF
    Datensatz löschen

    Voraussetzung ist, das man die ID des zu löschenden Eintrages kennt.

    $statement = $pdo->prepare("DELETE FROM feinstaub WHERE id = ?"); $statement->execute(array($id)); if ($statement->execute()) { echo "Der DB-Eintrag wurde erfolgreich gelöscht!"; } else { echo "Bitte den Administrator informieren!"; }
  • Yubikey als 2FA

    PHP
    3
    0 Stimmen
    3 Beiträge
    256 Aufrufe
    FrankMF

    Die ersten 12 Stellen eines Yubikeys sind immer gleich. Diese 12 Stellen speichern wir in einer Datenbank.

    $otp = substr ($otpKey, 0, 12);

    In der Datenbank speichern.

    //SQL $statement = $pdo->prepare("UPDATE users SET otpKey = :otpKey_neu WHERE id = :id"); $statement->execute(array('otpKey_neu' => $otp, 'id' => $userid)); //Überwachung auf Erfolg if ($statement->execute()) { // DB Eintrag erfolgreich geschrieben echo "YubiKey Passwort erfolgreich gespeichert!"; } else { echo "Datenbank Fehler! Bitte informieren Sie den Administrator."; }

    Ich hoffe, es hilft dem ein oder anderen sich mit diesem Thema etwas zu beschäftigen.

  • Wichtige Info

    Angeheftet PHP
    1
    0 Stimmen
    1 Beiträge
    195 Aufrufe
    Niemand hat geantwortet
  • Geo Loacation

    PHP
    1
    0 Stimmen
    1 Beiträge
    286 Aufrufe
    Niemand hat geantwortet
  • Wichtige Links zum Coden

    PHP
    1
    0 Stimmen
    1 Beiträge
    355 Aufrufe
    Niemand hat geantwortet
  • Reload einer PHP Seite verhindern

    PHP
    1
    0 Stimmen
    1 Beiträge
    687 Aufrufe
    Niemand hat geantwortet