PHP: Remote File Include by URL Denied CodeUnit 31 JAN 2009

PHPIf you ever get an php error message stating URL file-access is disabled in the server configuration, chances are that you are trying to include a remote file by URL call somewhere in your PHP script.

Older PHP versions used the Fopen wrapper allow_url_fopen = On to allow include/require calls to remote URLs, and while it is still a valid switch in your php.ini file, I’m afraid that from PHP 5.1 onwards a new switch controlling this behavior has been added, namely allow_url_include.

Generally it would seem that most freshly installed php.ini configurations have this switch turned off by default, so if you want to make use of the functionality, simply edit your php.ini file so that it reflects the following and then restart your web server:

allow_url_include = On

Not too difficult eh?

Related Posts:

About Craig Lotter

South African software architect and developer at Touchwork. Husband to a cupcake baker and father to two little girls. I don't have time for myself any more.