PHP error – URL file-access is disabled in the server configuration

January 17, 2010 by: Akhthar Parvez

If you get the following error while accessing a PHP script

URL file-access is disabled in the server configuration

Add the following into the .htaccess file for the particular website to get this work.

php_flag allow_url_include Off

Note: However, it’s highly recommended to keep allow_url_include disabled as it would be a security risk otherwise. This function allows remote files to be executed via include/require function within a PHP script. So allow this only if you’re sure the PHP code is safe and never allow it server wide.

Leave a Reply

You must be logged in to post a comment.