1

I used PHPBrew for a while and now want to remove it completely for various reasons.

How do I do that? Removing the ~/.phpbrew directory only is not sufficient.

Even removing and reinstalling all PHP packages is not enough, since Apache still somehow loads the allegedly removed PHPBrew module:

Loaded Configuration File => ~/.phpbrew/php/php-5.6.30/etc/php.ini
pixelbrackets
  • 1,958
  • 19
  • 28

1 Answers1

4

To switch between PHP5 and PHP7 in Apache, it is necessary for PHPBrew to enable & dissable custom apache modules. These need to be removed as well. Depending on the existing permissions it is not possible to just reinstall the apache module. Thats why they are still loaeded & running, even if the PHPBrew folder and PHP itself is already removed.

The following commands removed all PHPBrew files and reinstalled regular PHP on my system.

### remove phpbrew
rm -rf ~/.phpbrew/
rm -rf /usr/local/bin/phpbrew
vim ~/.bashrc #remove phpbrew settings

### either edit modules, or remove completely
sudo rm -rf /etc/apache2/mods-enabled/php*
sudo rm -rf /etc/apache2/mods-available/php*
sudo rm -rf /usr/lib/apache2/modules/libphp*

### reinstall php
#dpkg -l | grep php
#sudo apt-get remove --purge php*
sudo apt-get install --reinstall php php-common libapache2-mod-php
pixelbrackets
  • 1,958
  • 19
  • 28