How to enable allow_url_fopen

2019-10-03|Views:1656

allow_url_fopen is a security risk feature and as such it has been disabled on the server to protect the server and the accounts on it. Enabling it will put your website at risk.

Please refer to this article on the security issues of using allow_url_fopen:

<a href="http://phpsec.org/projects/phpsecinfo/tests/allow_url_fopen.html" target="_BLANK">http://phpsec.org/projects/phpsecinfo/tests/allow_url_fopen.html</a>

It is recommended that you implement your code with the more secured cUrl PHP extension. You can find an example of how to use cURL at the link below:

<a href="https://gist.github.com/romuloctba/1d16d820d7d5a8ab1ad4" target="_blank">https://gist.github.com/romuloctba/1d16d820d7d5a8ab1ad4 </a>

If you still want to enable it, follow the steps below:.

  1. Login to CPanel.
  2. Go to MultiPHP INI Editor.
  3. Select the domain you want.

To enable allow_url_fopen: Add the line below

allow_url_fopen = On

To disable allow_url_fopen. Add the line below

allow_url_fopen = Off

Click Save button


What are you looking for?