Zum Inhalt springen

Debian/PHP/Versionen: Unterschied zwischen den Versionen

Aus Foxwiki
Die Seite wurde neu angelegt: „Mit ispconfig3 haben wir die Möglichkeit, mehrere PHP Versionen zu verwalten und zu installieren, um diese einzelnen Webs zuzuordnen. Hier Zeige ich Euch, wie…“
 
K Textersetzung - „line>“ durch „line copy>“
 
(80 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
Mit ispconfig3 haben wir die Möglichkeit, mehrere PHP Versionen zu verwalten und zu installieren, um diese einzelnen Webs zuzuordnen. Hier Zeige ich Euch, wie man das am einfachsten macht.
'''Debian/PHP/Versionen'''
Es muss jedem Klar sein, das PHP auf die neuste Version geupdatet wird und die Maintainer Pakete überschrieben werden.
 
== 1. System auf den neusten Stand bringen ==
== Beschreibung ==
# apt-get update
 
  # apt-get upgrade
== System aktualisieren ==
== 2. Sury.org zur source.list hinzufügen ==
<syntaxhighlight lang="bash" highlight="1" line copy>
ACHTUNG: Es sind NUR Pakete für Debian 8, Debian 9 und Debian 10 verfügbar !!!!!
sudo apt update
  apt-get install apt-transport-https lsb-release ca-certificates
sudo apt upgrade
sudo apt install curl wget gnupg2 ca-certificates lsb-release apt-transport-https
</syntaxhighlight>
 
== Sury.org ==
; Beschreibung
DEB.SURY.ORG
About
This is a home for packaging various software into Debian and Ubuntu. Most notable package under DEB.SURY.ORG is the PHP packaging.
Who am I?
I am a Debian Developer since year 2000, and I have been packaging PHP for Debian since PHP 5. That means the official packages in Debian and Ubuntu are either my work or they are based on my work. The PHP packages in my Ubuntu PPA and Debian DPA matches the official packages in Debian. Basically I am saying that you can’t get any closer than that.
News
I publish the most important changes in the packaging and interesting news in dedicated Mastodon feed at deb@sury.org.
Packages
All packaging work is either done directly in the Debian unstable, or it will be in the unstable sooner or later.
 
 
; Repository hinzufügen
<syntaxhighlight lang="bash" highlight="1" line copy>
sudo apt install apt-transport-https lsb-release ca-certificates
 
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo apt-key add apt.gpg
sudo apt-key add php.gpg
 
sudo echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
 
sudo apt update
sudo apt upgrade
</syntaxhighlight>
 
; Hinweis
: Hierbei wird die Standard-Version von Debian aktualisiert
 
== PHP Versionen installieren ==
  # apt install [Paketliste]
 
== Standard-PHP-Versionen ==
Durch die Installation der PHP-Pakete von sury.org, wurde die Default PHP Version in Debian auf die neuste PHP Version geändert.
* Um Probleme zu vermeiden sollte diese auf Standard zurück gesetzt.
 
; Debian Standard-PHP-Versionen
{| class="wikitable sortable options"
|-
! Debian !! PHP
|-
| Debian 8 || 5.6
|-
| Debian 9 || 7.0
|-
| Debian 10 || 7.3
|-
| Debian 11 ||
|-
| Debian 12 || 8.2
|}
 
; Dies muss für php und php-cgi durchgeführt werden
'''# update-alternatives --config php'''
There are 3 choices for the alternative php (providing /usr/bin/php).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/php7.4 74 auto mode
1 /usr/bin/php7.2 72 manual mode
2 /usr/bin/php7.3 73 manual mode
3 /usr/bin/php7.4 74 manual mode
Press <enter> to keep the current choice[*], or type selection number: '''2'''
update-alternatives: using /usr/bin/php7.3 to provide /usr/bin/php (php) in manual mode
 
'''# update-alternatives --config php-cgi'''
There are 3 choices for the alternative php-cgi (providing /usr/bin/php-cgi).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/php-cgi7.4 74 auto mode
1 /usr/bin/php-cgi7.2 72 manual mode
2 /usr/bin/php-cgi7.3 73 manual mode
3 /usr/bin/php-cgi7.4 74 manual mode
Press <enter> to keep the current choice[*], or type selection number: '''2'''
update-alternatives: using /usr/bin/php-cgi7.3 to provide /usr/bin/php-cgi (php-cgi) in manual mode
 
== Einrichten in ISPconfig3 ==
; System > Zusätzliche PHP Versionen > Neue PHP Version hinzufügen
 
; Beispiel für PHP 7.1
 
{| class="wikitable sortable options"
|-
! Tab !! Einstellung || Wert
|-
| Name || Server || Server auswählen
|-
| Name || Name || PHP 7.1
|-
| FastCGI Einstellungen || Pfad zum PHP FastCGI Binary || php7.1-cgi
|-
| FastCGI Einstellungen || Pfad zum php.ini Verzeichnis || /etc/php/7.1/cgi/
|-
| FPM Einstellungen || Pfad zum PHP-FPM init Script || php7.1-fpm
|-
| FPM Einstellungen || Pfad des php.ini Verzeichnis || /etc/php/7.1/fpm/
|-
| FPM Einstellungen || Pfad zum PHP-FPM Pool Verzeichnis || /etc/php/7.1/fpm/pool.d
|}
 
== Dienste neu starten ==
# systemctl restart php7.1-fpm
 
# systemctl restart apache2
 
 
<noinclude>
 
== Anhang ==
=== Siehe auch ===
{{Special:PrefixIndex/{{BASEPAGENAME}}/}}
==== Sicherheit ====
=== Links ===
==== Projekt ====
==== Weblinks ====
 
[[Kategorie:Linux/Software/Verwaltung]]
[[Kategorie:PHP]]
[[Kategorie:ISPConfig]]
[[Kategorie:Debian]]
==== Script zur Installation ====
<syntaxhighlight lang="bash" highlight="1" line copy>
#!/bin/sh
  apt install -y apt-transport-https lsb-release ca-certificates
  wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
  wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
  echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
  echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
  apt-get update
  apt update
  apt-get upgrade
  apt upgrade
== 3. PHP Versionen installieren ==
  apt -y install php5.6 php5.6-common php5.6-fpm php5.6-gd php5.6-mysql php5.6-imap php5.6-cli php5.6-cgi php-pear php5.6-mcrypt php5.6-curl php5.6-intl php5.6-pspell php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl php-memcache php-imagick php-gettext php5.6-zip php5.6-mbstring php5.6-soap php5.6-common php5.6-opcache php5.6-mysql
* Ab PHP 7.2 ist das Paket "php-mycrpt" nicht mehr verfügbar
  apt -y install php7.0 php7.0-common php7.0-fpm php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php7.0-mcrypt php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-common php7.0-opcache php7.0-mysql
* Ab PHP 7.4 ist das Paket "php-recode" nicht mehr verfügbar. Evtl kommt es in der Stable wieder
  apt -y install php7.1 php7.1-common php7.1-fpm php7.1-gd php7.1-mysql php7.1-imap php7.1-cli php7.1-cgi php-pear php7.1-mcrypt php7.1-curl php7.1-intl php7.1-pspell php7.1-recode php7.1-sqlite3 php7.1-tidy php7.1-xmlrpc php7.1-xsl php-memcache php-imagick php-gettext php7.1-zip php7.1-mbstring php7.1-soap php7.1-common php7.1-opcache php7.1-mysql
=== PHP 5.6 ===
  apt -y install php7.2 php7.2-common php7.2-fpm php7.2-gd php7.2-mysql php7.2-imap php7.2-cli php7.2-cgi php-pear php7.2-curl php7.2-intl php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xmlrpc php7.2-xsl php-memcache php-imagick php-gettext php7.2-zip php7.2-mbstring php7.2-soap php7.2-common php7.2-opcache php7.2-mysql
  apt-get -y install php5.6 php5.6-common php5.6-fpm php5.6-gd php5.6-mysql php5.6-imap php5.6-cli php5.6-cgi php-pear php5.6-mcrypt php5.6-curl php5.6-intl php5.6-pspell php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl php-memcache php-imagick php-gettext php5.6-zip php5.6-mbstring php5.6-soap php5.6-common php5.6-opcache php5.6-mysql
  apt -y install php7.3 php7.3-common php7.3-fpm php7.3-gd php7.3-mysql php7.3-imap php7.3-cli php7.3-cgi php-pear php7.3-curl php7.3-intl php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring php7.3-soap php7.3-common php7.3-opcache php7.3-mysql
=== PHP 7.0 ===
  apt -y install php-zip php-zeroc-ice php-xml php-tcpdf php-ssh2 php-soap php-snmp php-redis php-php-gettext php-mysql php-pear php-net-smtp php-net-socket php-net-imap php-net-nntp php-mcrypt php-mbstring php-imap php-intl php-json php-imagick php-gnupg php-gd php-geoip php-fpm php-dev php-mail php-mail-mime php-curl php-cli php-cgi php-bz2 php-bcmath php-apcu php-auth-sasl php-apcu-bc
  apt-get -y install php7.0 php7.0-common php7.0-fpm php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php7.0-mcrypt php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-common php7.0-opcache php7.0-mysql
apt -y install mcrypt imagemagick libruby curl
=== PHP 7.1 ===
  apt-get -y install php7.1 php7.1-common php7.1-fpm php7.1-gd php7.1-mysql php7.1-imap php7.1-cli php7.1-cgi php-pear php7.1-mcrypt php7.1-curl php7.1-intl php7.1-pspell php7.1-recode php7.1-sqlite3 php7.1-tidy php7.1-xmlrpc php7.1-xsl php-memcache php-imagick php-gettext php7.1-zip php7.1-mbstring php7.1-soap php7.1-common php7.1-opcache php7.1-mysql
=== PHP 7.2 ===
  apt-get -y install php7.2 php7.2-common php7.2-fpm php7.2-gd php7.2-mysql php7.2-imap php7.2-cli php7.2-cgi php-pear php7.2-curl php7.2-intl php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xmlrpc php7.2-xsl php-memcache php-imagick php-gettext php7.2-zip php7.2-mbstring php7.2-soap php7.2-common php7.2-opcache php7.2-mysql
=== PHP 7.3 ===
  apt-get -y install php7.3 php7.3-common php7.3-fpm php7.3-gd php7.3-mysql php7.3-imap php7.3-cli php7.3-cgi php-pear php7.3-curl php7.3-intl php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring php7.3-soap php7.3-common php7.3-opcache php7.3-mysql
=== PHP 7.4 ===
  apt-get -y install php7.4 php7.4-common php7.4-fpm php7.4-gd php7.4-mysql php7.4-imap php7.4-cli php7.4-cgi php-pear php7.4-curl php7.4-intl php7.4-pspell php7.4-sqlite3 php7.4-tidy php7.4-xmlrpc php7.4-xsl php-memcache php-imagick php-gettext php7.4-zip php7.4-mbstring php7.4-soap php7.4-common php7.4-opcache php7.4-mysql
== 4. PHP auf Default zurücksetzen in Debian ==
Durch das installieren der neuen PHP Pakete, wurde die Default PHP Version in Debian auf die neuste PHP Version geändert. Dies kann Probleme mit einigen Anwendungen geben, deshalb setzen wir es auf Standard zurück.
*Für Debian 8 wählen wir: PHP 5.6
*Für Debian 9 wählen wir: PHP 7.0
*Für Debian 10 wählen wir: PHP7.3
BEIDE Befehle ausführen und BEIDE auf DEFAULT setzen:
  update-alternatives --config php
  update-alternatives --config php
  update-alternatives --config php-cgi
  update-alternatives --config php-cgi
=== 5. Einrichten in ispconfig3 ===
Wir loggen uns mit einem ADMIN Account in ispconfig ein.
Danach navigieren wir zu:
Dort fügen wir durch Kilcken auf: "Neue PHP Version hinzufügen", nacheinander folgendes hinzu:
=== PHP 5.6 ===
Tab "Name"
Server: Hier den Server auswählen
Name: Hier einen Namen vergeben
Tab "FastCGI Einstellungen"
Pfad zum PHP FastCGI Binary: php5.6-cgi
Pfad zum php.ini Verzeichnis: /etc/php/5.6/cgi/php.ini
Tab "FPM Einstellungen"
Pfad zum PHP-FPM init Script: php5.6-fpm
Pfad des php.ini Verzeichnis: /etc/php/5.6/fpm/php.ini
Pfad zum PHP-FPM Pool Verzeichnis: /etc/php/5.6/fpm/pool.d
=== PHP 7.0 ===
Tab "Name"
Server: Hier den Server auswählen
Name: Hier einen Namen vergeben
Tab "FastCGI Einstellungen"
Pfad zum PHP FastCGI Binary: php7.0-cgi
Pfad zum php.ini Verzeichnis: /etc/php/7.0/cgi/php.ini
Tab "FPM Einstellungen"
Pfad zum PHP-FPM init Script: php7.0-fpm
Pfad des php.ini Verzeichnis: /etc/php/7.0/fpm/php.ini
Pfad zum PHP-FPM Pool Verzeichnis: /etc/php/7.0/fpm/pool.d
=== PHP 7.1 ===
Tab "Name"
Server: Hier den Server auswählen
Name: Hier einen Namen vergeben
Tab "FastCGI Einstellungen"
Pfad zum PHP FastCGI Binary: php7.1-cgi
Pfad zum php.ini Verzeichnis: /etc/php/7.1/cgi/php.ini
Tab "FPM Einstellungen"
Pfad zum PHP-FPM init Script: php7.1-fpm
Pfad des php.ini Verzeichnis: /etc/php/7.1/fpm/php.ini
Pfad zum PHP-FPM Pool Verzeichnis: /etc/php/7.1/fpm/pool.d
=== PHP 7.2 ===
Tab "Name"
Server: Hier den Server auswählen
Name: Hier einen Namen vergeben
Tab "FastCGI Einstellungen"
Pfad zum PHP FastCGI Binary: php7.2-cgi
Pfad zum php.ini Verzeichnis: /etc/php/7.2/cgi/php.ini
Tab "FPM Einstellungen"
Pfad zum PHP-FPM init Script: php7.2-fpm
Pfad des php.ini Verzeichnis: /etc/php/7.2/fpm/php.ini
Pfad zum PHP-FPM Pool Verzeichnis: /etc/php/7.2/fpm/pool.d
=== PHP 7.3 ===
Tab "Name"
Server: Hier den Server auswählen
Name: Hier einen Namen vergeben
Tab "FastCGI Einstellungen"
Pfad zum PHP FastCGI Binary: php7.3-cgi
Pfad zum php.ini Verzeichnis: /etc/php/7.3/cgi/php.ini
Tab "FPM Einstellungen"
Pfad zum PHP-FPM init Script: php7.3-fpm
Pfad des php.ini Verzeichnis: /etc/php/7.3/fpm/php.ini
Pfad zum PHP-FPM Pool Verzeichnis: /etc/php/7.3/fpm/pool.d
==== PHP 7.4 ====
Tab "Name"
Server: Hier den Server auswählen
Name: Hier einen Namen vergeben
Tab "FastCGI Einstellungen"
Pfad zum PHP FastCGI Binary: php7.4-cgi
Pfad zum php.ini Verzeichnis: /etc/php/7.4/cgi/php.ini
Tab "FPM Einstellungen"
Pfad zum PHP-FPM init Script: php7.4-fpm
Pfad des php.ini Verzeichnis: /etc/php/7.4/fpm/php.ini
Pfad zum PHP-FPM Pool Verzeichnis: /etc/php/7.4/fpm/pool.d
Damit sind alle Versionen in ispconfig eingetragen und können ab jetzt individuell genutzt werden.
== 6. Restarten der Dienste ==
Jetzt werden alle Dienste restartet:
systemctl restart php5.6-fpm
systemctl restart php7.0-fpm
systemctl restart php7.1-fpm
systemctl restart php7.2-fpm
systemctl restart php7.3-fpm
systemctl restart php7.4-fpm
systemctl restart apache2
Ich nutze hierfür ein Script, welches alle Dienste restartet:
#!/bin/sh
echo "Restarting Services....";
systemctl restart php5.6-fpm
systemctl restart php7.0-fpm
systemctl restart php7.1-fpm
systemctl restart php7.2-fpm
systemctl restart php7.3-fpm
systemctl restart php7.4-fpm
systemctl restart apache2
echo "Done...";
Script zur automatischen Installation (Versionen werden nicht in ispconfig eingetragen)


Da ich mehrere Server habe und nicht alles per C&P machen wollte, habe ich mir ein kleines Script geschrieben:
</syntaxhighlight>
#/bin/sh
 
apt-get install -y apt-transport-https lsb-release ca-certificates
; Hinweis
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
: Versionen werden nicht in ISPconfig eingetragen
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
 
apt-get update
 
apt-get upgrade
[[Kategorie:Debian/Paketverwaltung]]
apt-get -y install php5.6 php5.6-common php5.6-fpm php5.6-gd php5.6-mysql php5.6-imap php5.6-cli php5.6-cgi php-pear php5.6-mcrypt php5.6-curl php5.6-intl php5.6-pspell php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl php-memcache php-imagick php-gettext php5.6-zip php5.6-mbstring php5.6-soap php5.6-common php5.6-opcache php5.6-mysql
 
apt-get -y install php7.0 php7.0-common php7.0-fpm php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php7.0-mcrypt php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-common php7.0-opcache php7.0-mysql
</noinclude>
apt-get -y install php7.1 php7.1-common php7.1-fpm php7.1-gd php7.1-mysql php7.1-imap php7.1-cli php7.1-cgi php-pear php7.1-mcrypt php7.1-curl php7.1-intl php7.1-pspell php7.1-recode php7.1-sqlite3 php7.1-tidy php7.1-xmlrpc php7.1-xsl php-memcache php-imagick php-gettext php7.1-zip php7.1-mbstring php7.1-soap php7.1-common php7.1-opcache php7.1-mysql
apt-get -y install php7.2 php7.2-common php7.2-fpm php7.2-gd php7.2-mysql php7.2-imap php7.2-cli php7.2-cgi php-pear php7.2-curl php7.2-intl php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xmlrpc php7.2-xsl php-memcache php-imagick php-gettext php7.2-zip php7.2-mbstring php7.2-soap php7.2-common php7.2-opcache php7.2-mysql
apt-get -y install php7.3 php7.3-common php7.3-fpm php7.3-gd php7.3-mysql php7.3-imap php7.3-cli php7.3-cgi php-pear php7.3-curl php7.3-intl php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring php7.3-soap php7.3-common php7.3-opcache php7.3-mysql
apt-get -y install php-zip php-zeroc-ice php-xml php-tcpdf php-ssh2 php-soap php-snmp php-redis php-php-gettext php-mysql php-pear php-net-smtp php-net-socket php-net-imap php-net-nntp php-mcrypt php-mbstring php-imap php-intl php-json php-imagick php-gnupg php-gd php-geoip php-fpm php-dev php-mail php-mail-mime php-curl php-cli php-cgi php-bz2 php-bcmath php-apcu php-auth-sasl php-apcu-bc
apt-get -y install mcrypt imagemagick libruby curl
update-alternatives --config php
update-alternatives --config php-cgi

Aktuelle Version vom 11. Mai 2025, 13:45 Uhr

Debian/PHP/Versionen

Beschreibung

System aktualisieren

sudo apt update
sudo apt upgrade
sudo apt install curl wget gnupg2 ca-certificates lsb-release apt-transport-https

Sury.org

Beschreibung

DEB.SURY.ORG About This is a home for packaging various software into Debian and Ubuntu. Most notable package under DEB.SURY.ORG is the PHP packaging. Who am I? I am a Debian Developer since year 2000, and I have been packaging PHP for Debian since PHP 5. That means the official packages in Debian and Ubuntu are either my work or they are based on my work. The PHP packages in my Ubuntu PPA and Debian DPA matches the official packages in Debian. Basically I am saying that you can’t get any closer than that. News I publish the most important changes in the packaging and interesting news in dedicated Mastodon feed at deb@sury.org. Packages All packaging work is either done directly in the Debian unstable, or it will be in the unstable sooner or later.


Repository hinzufügen
sudo apt install apt-transport-https lsb-release ca-certificates

sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo apt-key add apt.gpg
sudo apt-key add php.gpg

sudo echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list

sudo apt update
sudo apt upgrade
Hinweis
Hierbei wird die Standard-Version von Debian aktualisiert

PHP Versionen installieren

# apt install [Paketliste]

Standard-PHP-Versionen

Durch die Installation der PHP-Pakete von sury.org, wurde die Default PHP Version in Debian auf die neuste PHP Version geändert.

  • Um Probleme zu vermeiden sollte diese auf Standard zurück gesetzt.
Debian Standard-PHP-Versionen
Debian PHP
Debian 8 5.6
Debian 9 7.0
Debian 10 7.3
Debian 11
Debian 12 8.2
Dies muss für php und php-cgi durchgeführt werden
# update-alternatives --config php
There are 3 choices for the alternative php (providing /usr/bin/php).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/php7.4 74 auto mode
1 /usr/bin/php7.2 72 manual mode
2 /usr/bin/php7.3 73 manual mode
3 /usr/bin/php7.4 74 manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/php7.3 to provide /usr/bin/php (php) in manual mode
# update-alternatives --config php-cgi
There are 3 choices for the alternative php-cgi (providing /usr/bin/php-cgi).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/php-cgi7.4 74 auto mode
1 /usr/bin/php-cgi7.2 72 manual mode
2 /usr/bin/php-cgi7.3 73 manual mode
3 /usr/bin/php-cgi7.4 74 manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/php-cgi7.3 to provide /usr/bin/php-cgi (php-cgi) in manual mode

Einrichten in ISPconfig3

System > Zusätzliche PHP Versionen > Neue PHP Version hinzufügen
Beispiel für PHP 7.1
Tab Einstellung Wert
Name Server Server auswählen
Name Name PHP 7.1
FastCGI Einstellungen Pfad zum PHP FastCGI Binary php7.1-cgi
FastCGI Einstellungen Pfad zum php.ini Verzeichnis /etc/php/7.1/cgi/
FPM Einstellungen Pfad zum PHP-FPM init Script php7.1-fpm
FPM Einstellungen Pfad des php.ini Verzeichnis /etc/php/7.1/fpm/
FPM Einstellungen Pfad zum PHP-FPM Pool Verzeichnis /etc/php/7.1/fpm/pool.d

Dienste neu starten

# systemctl restart php7.1-fpm
# systemctl restart apache2



Anhang

Siehe auch

Sicherheit

Links

Projekt

Weblinks

Script zur Installation

 #!/bin/sh
 apt install -y apt-transport-https lsb-release ca-certificates
 wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
 echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
 apt update
 apt upgrade
 apt -y install php5.6 php5.6-common php5.6-fpm php5.6-gd php5.6-mysql php5.6-imap php5.6-cli php5.6-cgi php-pear php5.6-mcrypt php5.6-curl php5.6-intl php5.6-pspell php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl php-memcache php-imagick php-gettext php5.6-zip php5.6-mbstring php5.6-soap php5.6-common php5.6-opcache php5.6-mysql
 apt -y install php7.0 php7.0-common php7.0-fpm php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php7.0-mcrypt php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-common php7.0-opcache php7.0-mysql
 apt -y install php7.1 php7.1-common php7.1-fpm php7.1-gd php7.1-mysql php7.1-imap php7.1-cli php7.1-cgi php-pear php7.1-mcrypt php7.1-curl php7.1-intl php7.1-pspell php7.1-recode php7.1-sqlite3 php7.1-tidy php7.1-xmlrpc php7.1-xsl php-memcache php-imagick php-gettext php7.1-zip php7.1-mbstring php7.1-soap php7.1-common php7.1-opcache php7.1-mysql
 apt -y install php7.2 php7.2-common php7.2-fpm php7.2-gd php7.2-mysql php7.2-imap php7.2-cli php7.2-cgi php-pear php7.2-curl php7.2-intl php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xmlrpc php7.2-xsl php-memcache php-imagick php-gettext php7.2-zip php7.2-mbstring php7.2-soap php7.2-common php7.2-opcache php7.2-mysql
 apt -y install php7.3 php7.3-common php7.3-fpm php7.3-gd php7.3-mysql php7.3-imap php7.3-cli php7.3-cgi php-pear php7.3-curl php7.3-intl php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring php7.3-soap php7.3-common php7.3-opcache php7.3-mysql
 apt -y install php-zip php-zeroc-ice php-xml php-tcpdf php-ssh2 php-soap php-snmp php-redis php-php-gettext php-mysql php-pear php-net-smtp php-net-socket php-net-imap php-net-nntp php-mcrypt php-mbstring php-imap php-intl php-json php-imagick php-gnupg php-gd php-geoip php-fpm php-dev php-mail php-mail-mime php-curl php-cli php-cgi php-bz2 php-bcmath php-apcu php-auth-sasl php-apcu-bc
 apt -y install mcrypt imagemagick libruby curl
 update-alternatives --config php
 update-alternatives --config php-cgi
Hinweis
Versionen werden nicht in ISPconfig eingetragen