I have uninstalled php7 and all its modules from ubuntu, and when I try to reinstall the modules, I get the following error for each php module, and although the module is installed, because of this error, it is not activated and I cannot use them. Is the any way to solve this issue ? the error for each module(when installing):

Not replacing deleted config file /etc/php/7.0/mods-available/intl.ini
WARNING: Module [module name] ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module [module name] ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module [module name] ini file doesn't exist under /etc/php/7.0/mods-available
share|improve this question
up vote 4 down vote accepted

The problem was because of deleting php with sudo apt-get remove [package] and with this form, configuration files won't clean from computer and the next time you try to install the package, Ubuntu won't let the package configuration files to overwrite. the solution is to delete the package completely with purge and the autoremove the package so that It will completely remove from the computer with its configuration files and the next time you try to install, the configuration files with be created.

share|improve this answer

I came here because I had trouble installing Phpmyadmin on Ubuntu after I upgrade from php 7.0 to 7.1

Here is the tricks

1) remove php version (7.0 for instance - adapt the command line)

sudo apt-get install ppa-purge
sudo apt-get purge php7.0-common

2) Install php modules

sudo apt-get install php7.1-mbstring
sudo apt-get install php7.1-mcrypt
...

3) activate the modules

sudo phpenmod mbstring
sudo phpenmod mcrypt

(option) activate php7.1

sudo a2enmod php7.1

And of course restart your server

sudo systemctl restart apache2
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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