LMSouq
server-admin Open

Switch php versions on commandline ubuntu 16.04

SA
salimsaid
1 month ago
3 views
Problem Description
I have installed php 5.6 and and php 7.1 on my Ubuntu 16.04 I know with Apache as my web server, I can do a2enmod php5.6 #to enable php5 a2enmod php7.1 #to enable php7 When I disable php7.1 in Apache modules and enable php 5.6, Apache recognizes the change and uses php 5.6 interpreter as expected. But when I run internal php web server from the commandline: php -S localhost:8888 php handles requests using php 7. So how do I switch between php 5.6 and php 7.1 in the command line ?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base