hello,
on my basic server php max_execution limit change 30 to 100 currently set 30 default so we want to change 100 but this php.ini file not accessible and read-only massage display. kindly guid us how to change this value.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hi there,
You can change your PHP values via the
php.ini
file. The exact location of thephp.ini
file depends on your setup, but you can follow the steps here on how to locate the correctphp.ini
file and make the necessary change:Create a new file named
info.php
in your web server’s document root (usually/var/www/html
if you are using the default, but might be different if you’ve created a custom virtual host).Add the following content to the
info.php
file:Save the file and close it.
Open your web browser and navigate to
http://your_server_domain_or_IP/info.php
. This will display the PHP information page.Look for the “Loaded Configuration File” row. This row shows the path to the
php.ini
file currently in use.Now that you’ve found the location of your
php.ini
file, open it using a text editor. For example, if you’re using the command line, you can usenano
orvim
:Replace
/path/to/your/php.ini
with the actual path you found in step 5.max_execution_time
directive in the file. You can search for it by pressingCtrl
+W
innano
or/
invim
and typingmax_execution_time
. Update the value to 100:Save the file and exit the editor (
Ctrl
+X
and thenY
to save and exit innano
, or:wq
invim
).If you are using PHP-FPM with Nginx, restart the PHP-FPM service to apply the changes:
Replace
8.1
with your PHP version.If you are using Apache, then you need to restart the Apache web server:
info.php
file from your document root that you created in step 2, as it’s not recommended to keep this file publicly accessible for security reasons:Now the
max_execution_time
value has been updated to 100.Let me know if you have any questions.
Best,
Bobby