![]() ![]() It can be installed by changing php8.2 to php8.1 in this post presented commands. PHP 8.1 is an older version that is still supported. Remove PHP related file: sudo rm -rf /var/lib/systemd/timers/stamp-phpsessionclean.timer Install older versions Remove GPG key and repository: sudo rm -rf /etc/apt//php.gpg sudo rm -rf /etc/apt//php.list If you want to completely remove PHP anything related to it, execute the following command: sudo apt purge -autoremove -y php-common mime-support Run the following command to test a script: php main.php Uninstall PHP Once installation was completed, restart Apache: sudo service apache2 restart Testing PHPĬreate a new main.php file: nano main.php If we want to integrate PHP with Apache HTTP server, then install the following extension: sudo apt install -y libapache2-mod-php8.2 To use PHP with MySQL or MariaDB database, we need to install the following extension: sudo apt install -y php8.2-mysql PHP integration with Apache php -m PHP integration with MySQL or MariaDB We can use -m option to check what extensions are installed. PHP extensions can be installed using the following syntax: sudo apt install -y php8.2-extension_nameĮxecute the following command to install commonly used PHP extensions: sudo apt install -y php8.2-curl php8.2-gd php8.2-mbstring php8.2-xml php8.2-zip There are various PHP extensions that provide additional functionality. Next, install PHP 8.2 with command line interface (CLI): sudo apt install -y php8.2-common php8.2-cliĬheck PHP version when installation was finished: php -version Update the package lists: sudo apt update Install PHPĬonnect to Raspberry Pi via SSH and execute command to download GPG key: sudo wget -qO /etc/apt//php.gpg Īdd PHP repository: echo "deb $(lsb_release -sc) main" | sudo tee /etc/apt//php.list ![]() This tutorial shows how to install PHP 8.2 on Raspberry Pi. ![]() With each release of PHP, new features and various changes are introduced. The Raspberry Pi will have Raspbian OS installed and you’ll use phpMyAdmin to easily manage your database through a web interface. LAMP is a software bundle that is used for web development. PHP is a programming language that commonly used to create web applications and dynamic websites. In this guide, you’ll learn how to install a LAMP (Linux, Apache, MySQL, PHP) server on a Raspberry Pi. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |