Autor Subiect: Instalare php 7.2 in Debian 11  (Citit de 20 ori)

Admin

  • Administrator
  • guru
  • *****
  • Mesaje postate: 54
  • Karma: +0/-0
Instalare php 7.2 in Debian 11
« : Noiembrie 19, 2021, 11:26:59 a.m. »
#cauta ce versiuni sunt disponibile
apt-cache search php7.2

#sterge toate versiunile de php
sudo apt-get purge php7.0-common

apt-get update

apt-get install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'

apt-get update
apt-get install php7.2
#instaleaza extensii php
apt-get install php7.2-mysql php7.2-mbstring php7.2-xml php7.2-bcmath php7.2-curl php7.2-gd php7.2-zip

pentru a rula php din pagini html, in mods-available/mime.conf :
AddHandler php7-script .php .html .htm
AddType text/html .shtml
AddType text/html .php

that's all