xxxxxxxxxx
//update pHp 8.2.15
dpkg -l | grep php8.2 //packages
sudo apt update
sudo apt-add-repository ppa:ondrej-ubuntu-php
sudo apt update
sudo apt install php8.2 php8.2-cli php8.2-common php8.2-curl php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-readline
#Disable php7.4
a2dismod php7.4
#Enable php8.2
a2enmod php8.2
systemctl restart apache2
xxxxxxxxxx
apt-get install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php
xxxxxxxxxx
sudo apt install php libapache2-mod-php
# restart it
sudo systemctl restart apache2
xxxxxxxxxx
# Update package lists
sudo apt update
# Install PHP and some commonly used extensions
sudo apt install php libapache2-mod-php php-mysql
# Verify PHP installation
php --version
xxxxxxxxxx
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt -y install php8.0
xxxxxxxxxx
// version 7.4.3 if you are starting new project download v8
// otherwise do not install learn js frameworks.
sudo apt install php libapache2-mod-php php-common php-mysql php-gmp php-curl php-intl php7.4-mbstring php-xmlrpc php-gd php-xml php-cli php-zip