/go/fileuploads changes the PHP setting file_uploads in every php.ini file on the server. This setting decides whether PHP accepts HTTP file uploads at all. It: PHP only reads file_uploads from php.ini. A site cannot change it with ini_set() or a .user.ini file, which is why this command changes it for the whole server. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Check the current value
/go/fileuploads return
# Turn uploads off
/go/fileuploads Off
# Turn uploads on
/go/fileuploads On
Arguments
| Argument | Required | Default | Notes |
|---|---|---|---|
[value] |
No | On |
Use On or Off. The value is not validated, and if you pass several words they are joined with spaces. |
return |
No | — | Prints the current value. Not case-sensitive. |
The command has no --option flags.
Files changed
Only files that exist are changed.
| System | Files |
|---|---|
| AlmaLinux, Rocky, CentOS, Red Hat, Fedora | /etc/php.ini and /etc/opt/remi/<version>/php.ini for each installed version |
| Debian, Ubuntu | /etc/php.ini and, for each installed version, /etc/php/<version>/fpm/php.ini, /etc/php/<version>/cli/php.ini, and /etc/php/<version>/apache2/php.ini |
Examples
# Read the current value
/go/fileuploads return
# Turn file uploads off for the whole server
/go/fileuploads Off
# Turn them back on (same as running it with no argument)
/go/fileuploads On
# Check the result on a Debian or Ubuntu server
grep -H '^file_uploads' /etc/php/*/fpm/php.ini
# Check the result on an AlmaLinux, Rocky, or CentOS server
grep -H '^file_uploads' /etc/opt/remi/*/php.ini
Output
| Outcome | What you get |
|---|---|
return |
The current value, such as On, from the first file found. Empty if that file has no file_uploads line. Exit code 1. |
| Value set | File Uploads updated successfully. |
| Unsupported operating system | Unknown operating system. |
The confirmation line is printed even if no php.ini was found or changed. The command doesn’t list the files it edited.
Logging
Every run is appended to /var/log/go/fileuploads.log.
See the full reference at /go/fightmode 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.
