Change the max_execution_time for PHP in Ubuntu

To change the max_execution_time for PHP in Ubuntu, you can follow the steps given below:

  1. First, locate your php.ini file by running the following command in the terminal:

    sudo find / -name "php.ini"

    This will search for the php.ini file in your system.

  2. Once you have located the php.ini file, open it in a text editor such as nano by running the following command:

    sudo nano /path/to/php.ini

    Replace /path/to/php.ini with the actual path to your php.ini file.

  3. Search for the line that says max_execution_time in the php.ini file. You can use the search function in your text editor to find it quickly.

  4. Change the value of max_execution_time to the desired value, in seconds. For example, if you want to increase the time limit to 120 seconds, set it to:

    max_execution_time = 120
  5. Save the changes you made to the php.ini file (in nano you can do that by pressing CTRL + X, then Y, then ENTER).

  6. Finally, restart the Apache server by running the following command:

    sudo service apache2 restart

    This will apply the changes you made and restart the Apache server for the changes to take effect.

That’s it! You have successfully changed the max_execution_time for PHP in Ubuntu.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *