What it does
The setting allow_url_fopen lets PHP functions such as file_get_contents() read a file from a URL, for example https://example.com/data.json. Some plugins and scripts need it.
Steps
- Open the
php.inifile in the main folder of your website. If you have none, create a new text file and name itphp.ini. - Add this line:
allow_url_fopen = On
- Save the file.
- Reload your site. If nothing changes, wait a few minutes for the server to read the new setting.
Note: Some plans manage PHP settings in the control panel instead (for example PHP Selector or MultiPHP INI Editor in cPanel). If your change has no effect, use that tool, or ask Hostvento support.
Warning: The setting can be a security risk if your scripts open addresses that visitors type in. Turn it off again if you do not need it:
allow_url_fopen = Off.Quick recap
- Add
allow_url_fopen = Ontophp.ini. - Save, then test your script.