2

How do I restore php.ini to original setting in apache2 with php7.0. I have messed up the file.

edwinksl
  • 23,789

2 Answers2

2

Just run this into your terminal

sudo cp /usr/lib/php/7.0/php.ini-production /etc/php/7.0/apache2/php.ini
sudo service apache2 restart
David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • Brilliant! I can confirm by looking at the package's postinst script that this is what gets done when the package is installed, and is why dpkg -S /etc/php/7.0/apache2/php.ini returns nothing. – Alastair Irvine Feb 19 '19 at 09:15
1

I think maybe you can remove php7.0 and reinstall php7.0, then file php.ini auto renew file, exist file php.ini old --> php.ini.rpmsave. This is command help you remove and reinstall php7.0:

sudo apt-get remove php7.0

Reinstall php7.0:

sudo apt-get install php7.0
Kotler
  • 589