How do I restore php.ini
to original setting in apache2
with php7.0
. I have messed up the file.
Asked
Active
Viewed 2,606 times
2

edwinksl
- 23,789

Sunil Kumar
- 21
-
1Possible duplicate of How can I restore configuration files? – Ravexina Aug 08 '17 at 05:34
2 Answers
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

Rajib Paul
- 59
-
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