allow_url_fopen is a PHP setting that lets PHP functions such as file_get_contents() open remote URLs as if they were files. /go/allowurlfopen sets it in every php.ini on the server in one run. It: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Turn allow_url_fopen off in every php.ini
/go/allowurlfopen Off
Arguments
| Argument | Effect |
|---|---|
| (none) | Sets allow_url_fopen = On in every php.ini. |
On or Off |
Sets that value in every php.ini. |
return |
Prints the current value and changes nothing. Not case sensitive. |
| Any other text | Written to the setting as typed. The value is not checked. |
If you pass several words, they are joined with spaces and all written as the value. Pass a single value, normally On or Off.
Examples
# Turn the setting off everywhere
/go/allowurlfopen Off
# Turn the setting on everywhere
/go/allowurlfopen On
# Read the current value
/go/allowurlfopen return
# See the setting in every php.ini
grep -rH "^allow_url_fopen" /etc/php.ini /etc/php /etc/opt/remi 2>/dev/null
# Review the log of past runs
tail -n 20 /var/log/go/allowurlfopen.log
Output
| Message | Meaning |
|---|---|
Allow URL Fopen updated successfully. |
The run finished. It is printed even when no php.ini was found or changed. |
On or Off |
The current value, printed by return. |
| (an empty line) | return found no active allow_url_fopen line in the first file. |
Unknown operating system. |
The OS is not AlmaLinux, Rocky, CentOS, Red Hat, Fedora, Debian, or Ubuntu. Nothing is changed. |
return exits with status 1.
See the full reference at /go/allowurlfopen 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.
