Install PHP 8.3 and config Apache in Ubuntu 22.04
Automata
Posted on June 17, 2024
Install PHP:
sudo apt install php8.3
Install PHP module of Apache:
apt install libapache2-mod-php
Config PHP Module of Apache
By default, the PHP module is automatically enabled, if for some reason it is not enabled, you should run:
a2enmod php8.3
To update the PHP module configuration you must modify the files /etc/apache2/mods-enabled/php8.3.conf
and /etc/apache2/mods-enabled/php8.*.load
. Then you must restart the apache server by running the following command:
systemctl restart apache2.service
Confirm Installation
php -v
Optional Packages
PHP-CLI
Run PHP scripts via the CLI
apt install php-cli
PHP-CGI
Execute PHP scripts without installing the Apache PHP module
sudo apt install php-cgi
PHP-MySQL
apt install php-mysql
PHP-PgSQL
apt install php-pgsql
💖 💪 🙅 🚩
Automata
Posted on June 17, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
githubcopilot AI Innovations at Microsoft Ignite 2024 What You Need to Know (Part 2)
November 29, 2024