In this tutorial, we are going to see how to edit PHP ini file in ubuntu terminal. php.ini file is a default configuration file that is read when PHP is started. PHP settings and configurations can be changed through php.ini.
If you want to change PHP configurations on Ubuntu, the php.ini file is a simple and effective way. Follow the steps below to modify the PHP configuration file (php.ini) on the terminal in Ubuntu.
1. Open the terminal and run the following command to open the php.ini file.
sudo nano /etc/php5/apache2/php.ini
2. Change PHP parameters. For example, if you want to increase the execution time, increase the value of the variable max_execution_time in seconds.
max_execution_time = 60
3. Once you have changed the configuration values, save and exit the editor.
4. Now restart the web server to activate the changes you have made.
sudo service apache2 restart