Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    PHP Version updaten

    Scheduled Pinned Locked Moved Allgemein
    10 Posts 7 Posters 1.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      fabilbng1
      last edited by

      Hallo zusammen,
      aktuell läuft I-DoIt bei uns noch mit der PHP-Version 74.3, wollen jetzt aber updaten. Nun ist es ja so, dass I-DoIt selbst die Version 8.0 empfiehlt, wir überlegen aber, gleich auf die aktuellste Version 8.2.1 zu wechseln. Hat jemand von euch das gleiche schon getan und kann sagen, ob I-DoIT damit zurecht kommt?

      LFischerL 1 Reply Last reply Reply Quote 0
      • LFischerL Offline
        LFischer @fabilbng1
        last edited by

        Hallo @fabilbng1

        ich möchte an dieser Stelle nur kurz darauf hinweisen das i-doit die PHP Versionen 8.1 und 8.2 noch nicht offiziell unterstützt - das heißt es kann dadurch im Betrieb zu unvorhergesehenen Fehlern kommen.

        Wir arbeiten derzeit daran die Kompatibilität zu PHP 8.1 sicherzustellen... Ich weiß aber das einige User die Version 8.1 bereits einsetzen und ich GLAUBE da gibt es aktuell keine bis sehr wenige Probleme mit 🤔

        Aber es ist eben noch nicht offiziell 😉

        Viele Grüße
        Leo

        arminsA 1 Reply Last reply Reply Quote 1
        • arminsA Offline
          armins @LFischer
          last edited by

          @LFischer
          Unsere Systeme sind in der Regel Standard-Debian.
          Beim aktuellen Stable (11 bullseye) ist aber noch php 7.4 enthalten.

          Ist damit ein Update von i-doit auf neuere Versionen ausgeschlossen?

          Das neue Debian Stable, wenn es dann mal released ist, wird wohl php 8.2 enthalten. Also ist es, zumindest für i-doit, keine gute Idee auf Debian Standard zu setzen?

          LFischerL T 2 Replies Last reply Reply Quote 0
          • LFischerL Offline
            LFischer @armins
            last edited by

            Hallo @armins

            wir werden i-doit noch mindestens bis zur Mitte des Jahres kompatibel zu PHP 7.4 halten, ab dem zweiten Halbjahr ist es aktuell geplant die offizielle Kompatibilität einzustellen - da soll dann komplett auf PHP 8.0 und 8.1 gewechselt werden.

            Ich fürchte PHP 8.2 wird da noch nicht "offiziell" unterstützt. Ich gehe aber davon aus das es trotzdem (ohne größere Probleme) funktionieren wird, wie es auch jetzt schon der Fall ist.

            Ich werde das aber mal mitnehmen und mit den Kollegen besprechen ob wir die 7.4 Kompatibilität beibehalten können bis wir auch 8.2 offiziell unterstützen 🙂 Wir orientieren uns bei den Kompatibilitäten für gewöhnlich auch an den Linux Versionen.

            Ich werde hier noch mal bescheid geben wenn ich Neuigkeiten für euch habe 😉

            Viele Grüße
            Leo

            1 Reply Last reply Reply Quote 0
            • T Offline
              Treiss @armins
              last edited by

              @armins

              Zur Info, da ich die Tage ebenfalls Updates auf Debian Bullseye, i-Doit 24Pro Revison 202324000 und PHP8.0 hinter mir hab.
              War etwas tricky.

              Zuerst habe ich mich nach dieser Beschreibung von How to Install PHP 8 on Debian 11an die PHP8.0 Installation gehalten.
              Auch von allen bestehenden php7.4-* Modulen/Extensions die php8.0-* Versionen installiert.

              Alles immer auf die PHP Version 8.0 bezogen (noch nicht die 8.2)!

              Dann noch die /etc/apache2/sites-enabled/i-doit.conf nach PHP Einträgen durchforstet und angepasst.

              Die PHP Default Version aktiviert: update-alternatives --config php

              Dann die i-Doit Versionen nacheinander hochgezogen (Das neue Design find ich nicht wirklich toll, viel zu viel Platzverschwendung am Bildschirm).

              Dann Debian von Buster auf Bullseye online aktulisiert: Debian Upgradeinfo

              Läuft aktuell soweit.
              Einzig die Maria-DB wird für zukünftige i-Doit Versionen wohl nicht mehr ausreichen (zumindest wird es beim letzten i-doit Updatecheck angemahnt.

              Gruß
              Thomas

              1 Reply Last reply Reply Quote 0
              • K Offline
                klaus.langthaler
                last edited by

                Hallo,

                Sobald ich PHP8.0 aktiviere und PH7.4 deaktiviere bekomme ich beim Zugriff einen HTTP 500 Error.
                Kann mir vielleicht jemand einen Tipp geben woran es liegen könnte ?

                Danke für eure Unterstützung
                lg
                Klaus

                StefanP74S 1 Reply Last reply Reply Quote 0
                • StefanP74S Offline
                  StefanP74 @klaus.langthaler
                  last edited by StefanP74

                  Servus @klaus-langthaler

                  hast du die /etc/apache2/sites-enabled/i-doit.conf bearbeitet?
                  ... und auch /etc/apache2/sites-available/i-doit.conf

                  Ziemlich am Ende:
                  SetHandler "proxy:unix:/var/run/php/php8.0-fpm.sock|fcgi://localhost"

                  Steht bei dir vermutlich noch SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost"

                  LG Ich

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    klaus.langthaler
                    last edited by

                    @StefanP74
                    Hallo danke für deine schnelle Antwort.
                    Da hätte ich bereits nachgesehen nur ist da gar kein Eintrag von PHP die i-doit.conf in dem Verzeichniss sieht bei mir so aus ....
                    Leider weis ich nicht wie es damals Installiert wurde da der Kollege nicht mehr da ist....

                    <VirtualHost *:80>
                    ServerAdmin i-doit@example.net

                        DocumentRoot /var/www/html/
                        <Directory /var/www/html/>
                                # See /var/www/html/.htaccess for details
                                AllowOverride All
                                Require all granted
                        </Directory>
                    
                        LogLevel warn
                        ErrorLog ${APACHE_LOG_DIR}/error.log
                        CustomLog ${APACHE_LOG_DIR}/access.log combined
                    

                    </VirtualHost>
                    <VirtualHost *:443>
                    ServerName ooecmdb.acp.at

                    DocumentRoot /var/www/html/
                    <Directory /var/www/html/>
                    	# See /var/www/html/.htaccess for details
                    	AllowOverride ALL
                    	Require all granted
                    </Directory>
                    LogLevel warn
                    Errorlog ${APACHE_LOG_DIR}/error.log
                    CustomLog ${APACHE_LOG_DIR}/access.log combined
                    
                    SSLEngine on
                    SSLCertificatefile /etc/apache2/certs/stern.acp.at.pem
                    SSLCertificateKeyFile /etc/apache2/certs/stern.acp.at.key
                    SSLCertificateChainFile /etc/apache2/certs/stern.acp.at.CAextracted.pem
                    

                    </VirtualHost>

                    StefanP74S 1 Reply Last reply Reply Quote 0
                    • StefanP74S Offline
                      StefanP74 @klaus.langthaler
                      last edited by StefanP74

                      @klaus-langthaler

                      so sieht meine i-doit.conf aus dem Ordner /etc/apache2/sites-available und /etc/apache2/sites-enabled aus:

                      ServerName BLA-BLA.BLA
                      
                      <VirtualHost *:80>
                          ServerAdmin i-doit@example.net
                      
                          DirectoryIndex index.php
                          DocumentRoot /var/www/html/
                      
                          <Directory /var/www/html/>
                              AllowOverride None
                      
                      ## Apache Web server configuration file for i-doit
                      ##
                      ## This file requires:
                      ##
                      ## - Apache HTTPD >= 2.4 with enabled modules:
                      ##   - rewrite
                      ##   - expires
                      ##   - headers
                      ##   - authz_core
                      ## - "AllowOverride All" within the "<Directory>" directive in your
                      ##   "<VirtualHost>" directive
                      ##
                      ## For performance and security reasons we recommend to put these settings
                      ## directly into your VirtualHost configuration and explicitly set
                      ## "AllowOverride None". After each i-doit update you must repeat this.
                      ##
                      ## See the i-doit Knowledge Base for more details:
                      ## <https://kb.i-doit.com/>
                      
                      ## Disable directory indexes:
                      Options -Indexes +SymLinksIfOwnerMatch
                      
                      <IfModule mod_authz_core.c>
                          RewriteCond %{REQUEST_METHOD}  =GET
                          RewriteRule "^$" "/index.php"
                      
                          ## Deny access to meta files:
                          <Files "*.yml">
                              Require all denied
                          </Files>
                      
                          ## Deny access to hidden files:
                          <FilesMatch "^\.">
                              Require all denied
                          </FilesMatch>
                      
                          ## Deny access to bash scripts:
                          <FilesMatch "^(controller|.*\.sh)$">
                              Require all denied
                          </FilesMatch>
                      
                          ## Deny access to all PHP files…
                          <Files "*.php">
                              Require all denied
                          </Files>
                      
                          ## Deny access to wrongly created config backup files like ...inc.php.0123123 instead of ...inc.012341.php
                          <FilesMatch "\.php\.\d+$">
                              Require all denied
                          </FilesMatch>
                      
                          ## …except some PHP files in root directory:
                          <FilesMatch "^(index\.php|controller\.php|proxy\.php)$">
                              <IfModule mod_auth_kerb.c>
                                  Require valid-user
                              </IfModule>
                              <IfModule !mod_auth_kerb.c>
                                  Require all granted
                              </IfModule>
                          </FilesMatch>
                      
                          ## …except some PHP files in src/:
                          <Files "jsonrpc.php">
                              Require all granted
                          </Files>
                      
                          ## …except some PHP files in src/tools/php/:
                          <FilesMatch "^(rt\.php|barcode_window\.php|barcode\.php)$">
                              Require all granted
                          </FilesMatch>
                      
                          ## …except some PHP files in src/tools/php/qr/:
                          <FilesMatch "^(qr\.php|qr_img\.php)$">
                              Require all granted
                          </FilesMatch>
                      
                          ## …except some PHP files in src/tools/js/:
                          <FilesMatch "^js\.php$">
                              Require all granted
                          </FilesMatch>
                      </IfModule>
                      
                      ## Deny access to some directories:
                      <IfModule mod_alias.c>
                          RedirectMatch 403 /imports/.*$
                          RedirectMatch 403 /log/.*$
                          RedirectMatch 403 /temp/.*(?<!\.(css|xsl))$
                          RedirectMatch 403 /upload/files/.*$
                          RedirectMatch 403 /upload/images/.*$
                          RedirectMatch 403 /vendor/.*$
                      </IfModule>
                      
                      ## Cache static files:
                      <IfModule mod_expires.c>
                          ExpiresActive On
                          # A2592000 = 30 days
                          ExpiresByType image/gif A2592000
                          ExpiresByType image/png A2592000
                          ExpiresByType image/jpg A2592000
                          ExpiresByType image/jpeg A2592000
                          ExpiresByType image/ico A2592000
                          ExpiresByType text/css A2592000
                          ExpiresByType text/javascript A2592000
                          ExpiresByType image/x-icon "access 1 year"
                          ExpiresDefault "access 2 week"
                      
                          <IfModule mod_headers.c>
                              Header append Cache-Control "public"
                          </IfModule>
                      </IfModule>
                      
                      ## Pretty URLs:
                      <IfModule mod_rewrite.c>
                          RewriteEngine On
                          RewriteRule favicon\.ico$ images/favicon.ico [L]
                          RewriteCond %{REQUEST_FILENAME} !-l
                          RewriteCond %{REQUEST_FILENAME} !-f
                          RewriteCond %{REQUEST_FILENAME} !-d
                          RewriteRule .* index.php [L,QSA]
                      </IfModule>
                          </Directory>
                      
                          TimeOut 600
                          ProxyTimeout 600
                      
                          <FilesMatch "\.php$">
                              <If "-f %{REQUEST_FILENAME}">
                                  SetHandler "proxy:unix:/var/run/php/php8.0-fpm.sock|fcgi://localhost"
                              </If>
                          </FilesMatch>
                      
                          LogLevel warn
                          ErrorLog ${APACHE_LOG_DIR}/error.log
                          CustomLog ${APACHE_LOG_DIR}/access.log combined
                      </VirtualHost>
                      
                      

                      Ich habe daran nichts bis auf die PHP-Version geändert.

                      Die Abfolge ist ohne Fehler gelaufen?
                      sudo a2dismod php7.4
                      sudo a2enmod php8.0
                      systemctl restart php8.0-fpm
                      systemctl restart apache2

                      LG Ich

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        apfel-jan
                        last edited by apfel-jan

                        Hey,

                        stelle nochmal auf PHP8 um. Nun Seite aufrufen und den Error 500 damit erzeugen.

                        Nun schaust du einmal, was im der Datei /var/log/apache2/error.log steht. Da müsste ganz unten der letzte Eintrag nun das Problem zeigen. Poste das bitte einmal hier, falls du damit nicht so viel anfangen kannst.

                        Es kann einfach sein, dass ein PHP Modul fehlt. Du könntest auch die mods Mal vergleichen.

                        Dazu den Inhalt der Ordner /etc/php/(7.4 und 8.0)/mods-available vergleichen.

                        Sollte also bei 7.4 mehr drin sein als bei 8.0 dann fehlt ggf. etwas elementares.
                        Die Module kannst du dann per apt-get install php8.0-<Modulname> installieren.
                        Sonst wäre es möglich je nach PHP Einbindung (also ob Modul oder FPM) hier die config fehlt oder das libapache2 Modul.

                        1 Reply Last reply Reply Quote 0
                        • StefanP74S StefanP74 referenced this topic on
                        • First post
                          Last post