note 126548 added to migration73

From: Date: Sun, 31 Oct 2021 15:21:47 +0000
Subject: note 126548 added to migration73
Groups: php.notes 
Request: Send a blank email to php-notes+get-217131@lists.php.net to get a copy of this message
As part of increasing security, it is recommended to keep your version of PHP up to date. Here we have provided the steps to update the current version of PHP 7.2 to 7.3 in Ubuntu versions 14/16/18 / 19/20 without removing the old one. So that we can go back to the previous versions if there is something incompatible with the new one after changing. 1. Login to the server via SSH as root. * If you don't know, it doesn't matter, use the sudo command (like me) 2. Check your current version of PHP. $ php -v PHP 7.2.36 3. To install PHP 7.3, we must first add the repository: (Be careful here, (CAUTION) ... If you are in Ubuntu 19/20 version, it is not necessary to add repositories, it brings them by default. You can check the repositories with this command: $ sudo apt-cache policy | grep http | awk '{print $ 2 $ 3}' | sort -u If app / php or app / apache2 are not found, use this command: $ sudo add-apt-repository ppa: ondrej / php 4. Then run an update: $ sudo apt-get update 5. After completing the update, we need to install PHP 7.3. $ sudo apt install php7.3 6. Then install the required PHP packages according to your current installation: $ sudo apt install php7.3-common php7.3-cli php7.3-bz2 php7.3-curl php7.3-gd php7.3-intl php7.3-json php7.3-readline php7.3-xml php7 . 3-zip php7.3-fpm php7.3-bcmath php7.3-mbstring New commands are added for version 7.3 of Php. In the order they are written so as not to damage the modules. Stop Apache Server $ sudo systemctl stop apache2 Disable Php 7.2 Module $ sudo a2dismod php7.2 Active Proxy Module fcgi $ sudo a2enmod proxy_fcgi setenvif Activate fpm module $ sudo a2enmod php7.3-fpm Activate Php 7.3 Module $ sudo a2enmod php7.3 7. Then restart Apache: $ sudo systemctl start apache2 8. Finally we check the Status of the Apache2 Server, turn off and turn on the server a couple of times. (All correct): $ sudo systenctl status apache2 9. The new version of PHP should be active now. You can check it from the command line: $ php -v PHP 7.3.28 ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 104.35.74.95) ---- Manual Page -- https://php.net/manual/en/migration73.php Edit -- https://main.php.net/note/edit/126548 Del: integrated -- https://main.php.net/note/delete/126548/integrated Del: useless -- https://main.php.net/note/delete/126548/useless Del: bad code -- https://main.php.net/note/delete/126548/bad+code Del: spam -- https://main.php.net/note/delete/126548/spam Del: non-english -- https://main.php.net/note/delete/126548/non-english Del: in docs -- https://main.php.net/note/delete/126548/in+docs Del: other reasons-- https://main.php.net/note/delete/126548 Reject -- https://main.php.net/note/reject/126548 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217131) next »