allow_url_fopen and allow_url_include
Zend Certification, PHP December 11th, 2007
As written on php.net
allow_url_fopen
This option enables the URL-aware fopen wrappers that enable accessing URL object like files. Default wrappers are provided for the access of remote files using the ftp or http protocol, some extensions like zlib may register additional wrappers.
This option allows the use of URL-aware fopen wrappers with the following functions: include(), include_once(), require(), require_once().
As a note is necessary to have allow_url_fopen set to true (On) to use allow_url_include and it is set to false (Off) or not included on the php.ini file by default.
If you run into a error like this: URL file-access is disabled in the server configuration.
when you including a file to your script ( ex. a .inc file ) it’s more likely that your php.ini has the allow_rul_include not set and that is causing the error.
If you don’t have access to your server php ini file, try to rename the file to .inc.php or access the file as you would using your browser that considering that you have allow_url_fopen set to true in your server.
Posts
Leave a Comment
You must be logged in to post a comment.