I deployed my app to digital ocean server but there are error in max execution time out?
My question is how to edit the php.ini max execution time out in digital ocean without droplet created and it is a manual deployment?
I tried different solution like adding user.ini to the root folder and set it to 0 inside the user.ini file. Another solution i tried is locating the php.ini in digital ocean console by typing this command.
php -i | grep php.ini
and it gives me the output
Configuration File (php.ini) Path => /app/.heroku/php/etc/php Loaded configuration File => /app/.heroku/php/etc/php/php.ini
And when i tried to access the php.ini it says Permission Denied.
Im stucked with almost 3 days of this problem any help or suggestion would highly appreciated.
My Answer:
/etc/php/7.4/cli
Loaded Configuration File = /etc/php/7.4/cli/php.ini
To change the max_execution_time in the php.ini file, you can follow these steps:
1. SSH into your digital ocean server using the command line.
2. Navigate to the directory where the php.ini file is located by running the command:
cd /etc/php/7.4/cli/
3. Edit the php.ini file using a text editor like nano or vim:
sudo nano php.ini
4. Search for the line that contains "max_execution_time" using the search function (usually Ctrl + W in nano).
5. Change the value of max_execution_time to the desired value (e.g. 300 for 5 minutes).
6. Save the changes and exit the text editor (Ctrl + X in nano).
7. Restart the PHP service to apply the changes:
sudo service php7.4-fpm restart
After following these steps, the max_execution_time should be updated in the php.ini file on your digital ocean server.
Rate this post
3 of 5 based on 7557 votesComments