Jump to content


Photo

file_get_contents() problem


  • Please log in to reply
5 replies to this topic

#1 php_b34st

php_b34st
  • Members
  • PipPipPip
  • Advanced Member
  • 168 posts

Posted 29 August 2006 - 07:07 PM

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.runes...sonal.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?

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 29 August 2006 - 07:12 PM

use phpinfo() to check the setting for "allow_url_fopen" in the ini file
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 29 August 2006 - 07:13 PM

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.

#4 php_b34st

php_b34st
  • Members
  • PipPipPip
  • Advanced Member
  • 168 posts

Posted 29 August 2006 - 07:19 PM

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

#5 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 29 August 2006 - 07:22 PM

You could ask for the output from phpinfo() before you buy
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#6 php_b34st

php_b34st
  • Members
  • PipPipPip
  • Advanced Member
  • 168 posts

Posted 29 August 2006 - 07:25 PM

Good acvice as usual Barand! I will do that. Thanks again for your help (including the help with the script in question)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users