Posts

Showing posts from November, 2019

How to Install Multiple PHP Version with Apache on Ubuntu 18.04 & 16.04

Apache Installation Install Apache web server from the official repository. Launch terminal on your system or login with ssh for remote systems. Execute the following commands to install the latest available version of Apache web server. > sudo apt update  > sudo apt install apache2 libapache2-mod-fastcgi  //Ubuntu 18.04 Users: > sudo apt install apache2 libapache2-mod-fcgid PHP Installation For the installation of PHP versions, we use the PPA maintained here. Use the below couple of commands to add the PPA to your system. > sudo apt install python-software-properties > sudo add-apt-repository ppa:ondrej/php For this tutorial, we are using the PHP 5.6 and PHP 7.2 to configure with Apache web server. To use the multiple PHP versions, we will use PHP FPM and FastCGI. Let’s install the following packages on your system. > apt update > sudo apt install php5.6 php5.6-fpm > sudo apt install php7.2 php7.2-fpm After installation, php-fpm services w

doctrine/lexer Issue - Can't install because php 7.2 is required by doctrine/lexer

For some reason packages need to be added to composer.lock as some platform with specific PHP version, you can define the platform field in composer.json file. The composer.json which would add and install package versions to composer.lock as PHP 7.1.0 platform: ... "require": {     "php": "^7.1" }, "config": {     "platform": {         "php": "7.1.0"     } }, ...