Knowledge Base

Setting the allow_url_fopen PHP directive

This article discusses configuring the allow_url_fopen PHP directive on a managed VPS or Flex Dedicated Server.

The information in this article only applies to certain types of hosting accounts. To determine whether or not the information below applies to your account, please see this article.

Configuring the allow_url_fopen directive

You should be aware of the security implications of enabling and disabling the allow_url_fopen directive. PHP scripts that can access remote files are potentially vulnerable to arbitrary code injection.

When the allow_url_fopen directive is enabled, you can write scripts that open remote files as if they are local files. Some applications may require that the allow_url_fopen directive is enabled on your system.

However, PHP does not allow you to set the allow_url_fopen directive in an .htaccess file. Instead, to enable this functionality, please open a support ticket on the A2 Hosting Customer Portal at

More Information