![]() To install the PHP version 7.4 with PHP-FPM support, run the following command: # apt-get install php7.4 php7.4-fpm php7.4-cli -y To install the PHP version 7.2 with PHP-FPM support, run the following command: # apt-get install php7.2 php7.2-fpm php7.2-cli -y Install Multiple Versions of PHP (7.2, 7.4, 8.0 and 8.1) Once the repository is up-to-date, you can proceed to install multiple PHP versions. Next, update the repository with the following command: # apt-get update -y Once all the dependencies are installed, add the PHP repository using the following command: # add-apt-repository ppa:ondrej/php So you'll need to add the PHP repository in your system to install the multiple PHP versions.įirst, install the required dependencies with the following command: # apt-get install software-properties-common gnupg2 -y A root password is configured on the server.īy default, Ubuntu 20.04 ships with the PHP version 7.4.In this article, we'll show you how to install PHP 7.2, 7.4, 8.0 and 8.1 on Ubuntu 20.04. ![]() In this case, you can configure NGINX to define your desired PHP version. This is very useful when you have multiple PHP applications on your server and each application is compatible with the different PHP versions. I hope you enjoy our tutorial, Let me know incase you encounter any error I would love to answer that.If you are a system or web server administrator, it's very important for you to know how to install and use multiple PHP versions on a single server. Have you forgotten your MySQL root password? If yes, then in this article we will discuss on how to reset MySQL root password in centos or ubuntu in a few steps. Next Featured How To Reset MySQL 5.7 Root Password In Centos Or Ubuntu Just change the version of your current php that was installed, it will look like this for nginx: fastcgi_pass unix:/var/run/php/ And We're Done Folks. It might be pointed out to your old php-fpm proxy socket. Make sure to check your apache2 and nginx web server configuration if you're using php-fpm. Sudo update-alternatives -set php-config /usr/bin/php-config7.3 update-alternatives - is usually called from the postinst (configure) or prerm (install) scripts in Debian packages TIPS: Sudo update-alternatives -set phpize /usr/bin/phpize7.3 Sudo update-alternatives -set phar.phar /usr/bin/phar.phar7.3 Sudo update-alternatives -set phar /usr/bin/phar7.3 sudo update-alternatives -set php /usr/bin/php7.3 ![]() Or, if you're using nginx sudo service nginx restart Step 4.įinally to reflect your php 7.3 in your bash terminal just run these command below. If you are using apache2 you can restart it using this command sudo service apache2 restart sudo a2enmod php7.3 a2enmod - is a script that enables the specified module. We can now enable our php 7.3 using a2enmod. sudo a2dismod php7.4 a2dismod - disables a module by removing those symlinks. The next thing, we should do is to disable the installed PHP 7.4 using a2dismod. sudo apt-get install php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-mysql php7.3-mbstring php7.3-zip php7.3-fpm php7.3-intl php7.3-simplexml php7.3-bcmath php7.3-dev Step 3. if we are working with laravel you should install these modules. Like what we have right now, it will install the php 7.3 version.Īfter the installing the php 7.3 version we will now install some of the modules needed for our project. sudo apt-get install php7.3 apt-get install - will find the package in its database and it will download / install in your system. Once the update is finish, we will install our PHP 7.3 in our ubuntu. Then run a apt-get update which tells APT to update its database based on the available packages that can be installed in your ubuntu sudo apt-get update Step 2. sudo add-apt-repository ppa:ondrej/php add-apt-repository - is a Python script that allows you to add an APT repository which can easily look for the updates from a given sources. Login to your ubuntu server using your favorite shell command applications, for now i'm using my iTerm app on mac. It's either one of your PHP functions or method is not yet supported and needs some additional testing before upgrading again.Some functionality of our laravel application is not working properly such as pdf for WKHTMLTOPDF.This tutorial can be use for downgrading your PHP 7.3 to PHP 7.2 and so on and so forth. For this, we will use different commands such sudo, apt-get, a2dismod, and a2endmond which we will explain along the road. Good Day Pare, In this tutorial, I'll teach you how to downgrade your PHP 7.4 to PHP 7.3 on your Ubuntu 20.04 LTS safely. How to Safely Downgrade from PHP 7.4 to PHP 7.3 on Ubuntu 20 LTS
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |