/go/maxexecutiontime sets PHP's max_execution_time (the longest a script may run, in seconds) in the php.ini file of every installed PHP version at once. It: The command does not reload PHP. New values take effect only after PHP-FPM (or Apache) is reloaded. See Applying the change. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Set the default (600 seconds) in every php.ini
/go/maxexecutiontime
# Reload PHP so the new value is used
/go/fpm
Options
This command has no options. It takes one optional argument.
| Argument | Required | Default | Notes |
|---|---|---|---|
<seconds> |
No | 600 |
A whole number of seconds. 0 means no limit. Nothing checks the value (see Validation). |
return |
No | — | Prints the current value instead of setting one. |
Examples
# Use the default of 600 seconds
/go/maxexecutiontime
# Allow scripts to run for 5 minutes
/go/maxexecutiontime 300
# Remove the limit (use with care)
/go/maxexecutiontime 0
# Show the current value
/go/maxexecutiontime return
# Set a value and apply it
/go/maxexecutiontime 120 && /go/fpm
Output
| Outcome | What you get |
|---|---|
| Value set | Max Execution Time updated successfully. |
return |
The number from the first php.ini found. Blank if that file has no max_execution_time line. |
| Unsupported operating system | Unknown operating system. Nothing is changed. |
The success message is printed even if no php.ini file was found, so it does not prove that anything changed. Check with return.
Every run is also recorded in /var/log/go/maxexecutiontime.log.
[!NOTE]
returnends with exit status1, and a normal update ends with0. In scripts, read the output instead of relying on the exit status.
See the full reference at /go/maxexecutiontime and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
