Install PHP 8.3 and config Apache in Ubuntu 22.04

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 …


This content originally appeared on DEV Community and was authored by Automata

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


This content originally appeared on DEV Community and was authored by Automata


Print Share Comment Cite Upload Translate Updates
APA

Automata | Sciencx (2024-06-17T00:33:48+00:00) Install PHP 8.3 and config Apache in Ubuntu 22.04. Retrieved from https://www.scien.cx/2024/06/17/install-php-8-3-and-config-apache-in-ubuntu-22-04/

MLA
" » Install PHP 8.3 and config Apache in Ubuntu 22.04." Automata | Sciencx - Monday June 17, 2024, https://www.scien.cx/2024/06/17/install-php-8-3-and-config-apache-in-ubuntu-22-04/
HARVARD
Automata | Sciencx Monday June 17, 2024 » Install PHP 8.3 and config Apache in Ubuntu 22.04., viewed ,<https://www.scien.cx/2024/06/17/install-php-8-3-and-config-apache-in-ubuntu-22-04/>
VANCOUVER
Automata | Sciencx - » Install PHP 8.3 and config Apache in Ubuntu 22.04. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/17/install-php-8-3-and-config-apache-in-ubuntu-22-04/
CHICAGO
" » Install PHP 8.3 and config Apache in Ubuntu 22.04." Automata | Sciencx - Accessed . https://www.scien.cx/2024/06/17/install-php-8-3-and-config-apache-in-ubuntu-22-04/
IEEE
" » Install PHP 8.3 and config Apache in Ubuntu 22.04." Automata | Sciencx [Online]. Available: https://www.scien.cx/2024/06/17/install-php-8-3-and-config-apache-in-ubuntu-22-04/. [Accessed: ]
rf:citation
» Install PHP 8.3 and config Apache in Ubuntu 22.04 | Automata | Sciencx | https://www.scien.cx/2024/06/17/install-php-8-3-and-config-apache-in-ubuntu-22-04/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.