How to install php7.3 on debian/ubuntu

sudo apt update
sudo apt upgrade -y
  1. sudo apt -y install lsb-release apt-transport-https ca-certificates
  2. sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
  3. echo “deb https://packages.sury.org/php/ $(lsb_release -sc) main” | sudo tee /etc/apt/sources.list.d/php7.3.list
  • sudo apt update
  • sudo apt -y install php7.3
Check Version installed
$ php -v
See example below which install standard PHP extensions.
sudo apt install php7.3-cli php7.3-fpm php7.3-json php7.3-pdo php7.3-mysql php7.3-zip php7.3-gd php7.3-mbstring php7.3-curl php7.3-xml php7.3-bcmath php7.3-json

To install Apache Module for PHP,

run:sudo apt install libapache2-mod-php7.3

Confirm one:

apt policy php7.3-cli

Discussion (3)

  1. sudo apt install -y php7.4-mysql php7.4-ssh2 php7.4-xml php7.4-curl php7.4-gd php7.4-imagick php7.4-json php7.4-mbstring

  2. sudo apt install -y php8.2-mysql php8.2-ssh2 php8.2-xml php8.2-curl php8.2-gd php8.2-imagick php8.2-mbstring

Comment posting has been disabled on this doc.

©2024  gTokTok.COM

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending
0

Log in with your credentials

or    

Forgot your details?

Create Account