0

I have install php versions 5.6,7.0 and 7.1 . But php -v returns

PHP 5.5.9-1ubuntu4.21 (cli) (built:feb 9 2017) <br>
copyright (c) 1997-2014 The PHP Group

I also tried these commands

 a2enmod php7.1 
 a2dismod php5.6 
 service apache2 restart

but they don't work ..

so how can i run multiple versions of php on terminal?

3
  • 1
    Running multiple versions of php might get complicated. See this. – kashish Jun 17 '17 at 6:32
  • Please edit your question to add the output of dpkg -l | grep php. P.S.: PHP cli has nothing to do with Apache. – fkraiem Jun 17 '17 at 6:43
  • How to have two versions of PHP installed and switch easily between them? does not solve with link ... i have try all the command and all given suggestion ....... – Jignesh Joisar Jun 19 '17 at 4:56

Browse other questions tagged or ask your own question.