2

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

edwinksl
  • 23,569
  • 16
  • 74
  • 100
  • 1
    Possible duplicate of [How can I restore configuration files?](https://askubuntu.com/questions/66533/how-can-i-restore-configuration-files) – Ravexina Aug 08 '17 at 05:34

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
  • 35,754
  • 55
  • 92
  • 145
Rajib Paul
  • 59
  • 1
  • 8
  • 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
Richbest
  • 579
  • 4
  • 8