1

Previously I have both PHP 5.6 and PHP7 installed in my pc and switch between them every time I need for a web-app with:

sudo update-alternatives --set php /usr/bin/php[version]

But I made the error to install 5.3 because I one app I wanted to test was running with that PHP.

But now, no matter what I do, everytime I run php -v I always get:

PHP 5.3.29 (cli)

I don't know where it's installed, I tried with locate php5.3 but I don't get anything (?) and with locate php5 I get all my installations from 5.6 and 7 that I want to activate.

Uninstalling php 5.3 in ubuntu 14.04

I tried with php --ini to get a clue where is located but then:

Configuration File (php.ini) Path: /usr/local/lib Loaded Configuration File: (none) Scan for additional .ini files in: (none) Additional .ini files parsed: (none) In /usr/local/lib there's nothing about php (?)

Any help with this?

  • try to find / -name *php*. This way you will be able to find all the PHP versions. For the future I would recommend to run stuff with update alternatives in a docker container/virtual machine. – LittleByBlue Mar 23 '18 at 12:12
1

For some reason it was only named as "php", so I couldn' track it down with the version number.

Then it was simply as

sudo apt-get purge php

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.