php_b34st Posted August 29, 2006 Share Posted August 29, 2006 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 35Warning: 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 35Is there a way to resolve this or do i need to buy a hosting plan? Quote Link to comment https://forums.phpfreaks.com/topic/19054-file_get_contents-problem/ Share on other sites More sharing options...
Barand Posted August 29, 2006 Share Posted August 29, 2006 use phpinfo() to check the setting for "allow_url_fopen" in the ini file Quote Link to comment https://forums.phpfreaks.com/topic/19054-file_get_contents-problem/#findComment-82395 Share on other sites More sharing options...
wildteen88 Posted August 29, 2006 Share Posted August 29, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/19054-file_get_contents-problem/#findComment-82397 Share on other sites More sharing options...
php_b34st Posted August 29, 2006 Author Share Posted August 29, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/19054-file_get_contents-problem/#findComment-82403 Share on other sites More sharing options...
Barand Posted August 29, 2006 Share Posted August 29, 2006 You could ask for the output from phpinfo() before you buy Quote Link to comment https://forums.phpfreaks.com/topic/19054-file_get_contents-problem/#findComment-82407 Share on other sites More sharing options...
php_b34st Posted August 29, 2006 Author Share Posted August 29, 2006 Good acvice as usual Barand! I will do that. Thanks again for your help (including the help with the script in question) Quote Link to comment https://forums.phpfreaks.com/topic/19054-file_get_contents-problem/#findComment-82409 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.