Jump to content

Archived

This topic is now archived and is closed to further replies.

php_b34st

file_get_contents() problem

Recommended Posts

Hi I have a script which uses the file_get_contents() function and in testing works. but when i upload i get the following error:

Warning: file_get_contents(): URL file-access is disabled in the server configuration in /data/members/free/tripod/uk/x/t/a/xtasyalliance/htdocs/validate.php on line 35

Warning: file_get_contents(http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1=): failed to open stream: no suitable wrapper could be found in /data/members/free/tripod/uk/x/t/a/xtasyalliance/htdocs/validate.php on line 35

Is there a way to resolve this or do i need to buy a hosting plan?

Share this post


Link to post
Share on other sites
use phpinfo() to check the setting for "allow_url_fopen" in the ini file

Share this post


Link to post
Share on other sites
Looks like you host has disabled file-access in the server configuration. Most probably the allow_url_fopen directive has been disabled, which allows you to send http requests with the file functions.

Share this post


Link to post
Share on other sites
You are correct my host has disabled "allow_url_fopen" but what more can you expect from a free host? I guess its time i invested in a host! Thanks for the help! btw is it common for this feature to be disabled? I just dont want to buy a hosting plan to find out that it will give me the same error message

Share this post


Link to post
Share on other sites
Good acvice as usual Barand! I will do that. Thanks again for your help (including the help with the script in question)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.