Considering how regularly new versions of Firefox now come along, that's quite some bug fix list in version 10! http://t.co/K3I2vLpW 1 week ago

21st
Apr 09

URL file-access is disabled



closeThis post was written 2 years 9 months 20 days days old, so is a bit old now. Feel free to read and comment on this post, just remember some things change with time and any facts in this post may not be accurate anymore.

Many of my plugins read from XML or RSS feeds. In these cases, I read the files using the PHP file_get_contents() command. However, if you get the following error…

Warning: file_get_contents(): URL file-access is disabled in the server configuration

..then this means that your PHP is not configured to allow this command.

If you can, edit your php.ini file (usually located in /etc/php.ini) and make sure this line is in it:

allow_url_fopen = On

If you can’t edit php.ini, you can try the following…

If you don’t have one already, create a file called .htaccess in your root folder. Now add the following line:

php_value allow_url_fopen on

If that doesn’t work then, well, that’s probably down to restrictions by your host.

Delicious Digg Facebook LinkedIn Read It Later reddit StumbleUpon Twitter SeparatorEmail Google Translate PDF Online Print Friendly

2 Comments

  1. drk says:

    Isn’t there a way to work around this? Opening up this function in php gives hackers big advantages as 90% of the exploits out there require allow_url_fopen to be on (default is off).

  2. David says:

    There is indeed – look out for the new version of simple-feed-list which has a solution to this! I’ll then roll this change out to all the other plugins that uses file_get_contents.

No Pingbacks/Trackbacks

    Leave a Comment

    All comments are approved manually. No spam please, or comments that add nothing to the conversation.

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>