URL file-access is disabled

Hi, I just purchased a new hosting account and have uploaded my page but I get the following error:

Warning: file_get_contents(): URL file-access is disabled in the server configuration in /home/.gritz/tonehaven/tonehaven.com/index.php on line 6

You can see the full error here: http://www.tonehaven.com/

I searched for this and found this page: http://www.dotsilver.com/faq/120.html

"Your hosting provider prohibits function file_get_contents() to connect to foreign hosts. "

I would like to know how I can enable “connect to foreign hosts” as this is critical for my site to run?

I also sent this as a support ticket about 3 days ago and have not herd back which is very concerning and I’m regretting ever have purchased the service now as prompt support is critical.

I believe you’ll need to use cURL. Here’s an article in the wiki that uses the same function you’re using as an example:


wiki.dreamhost.com can come in handy, so I’d add that to your bookmarks as a reference.

:stuck_out_tongue: Save up to $96 at Dreamhost with 96DOLLARSOFF promo code (I get $1).
Or save $97 with TAKESEILERSCASH.

thanks but I can’t get this to work and have still not herd back from the tech support, do you know why they won’t reply or is this common?

Terms of Service outline a 24 hour response time.

I’ve had good luck with using the cURL option. What happens when you try it?


An alternative would be to install your own PHP5 and allow for URL fopens.


I’m not that familiar with php and I think by looking at those instructions then it would be abit over my head but thanks for the suggestion.

The code I’m using is from laiwa.com, it is a template script that will load up on the server.

I ran it on another host recently and it worked fine and looks like this when running: http://www.freewirelessringtone.com/

I herd back from Tech and they just pointed me to the wiki and said they can’t help further.

I’m unsure what to do, I don’t want to use this service if I can’t use remote files and I thought it would come witht the service like my other hosting. I wanted to also run other web sites on this hosting account that also use remote files using another script.

I could post the code but I think it would not post here on this forum?

I have requested a refund on my account as I don’t want to deal with this hosting company if they can’t offer standard features and faster support. I’m unsure if they will refund as I have also purchased a domain name with them, i guess I will have to wait another day or 2 just to find this out and see what I can do about this mess…

With most responsible webhosts, it is now standard practice to disable URL file access. You are likely to encounter this problem again. Your best bet is to contact the authors of the canned script you are trying to run, and ask them to provide a cURL-based alternative.

Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]

DH can offer it, but they choose not to by default for security reasons. I can see things from your point of view, but I do recommend either learning how to modify the script, or seek an alternative script.

DH will be able to refund your hosting (assuming you paid by credit card), but not the domain name.

Save $97 on all yearly plans with the promo code [color=#CC0000]DREAMZAP[/color] – zaps the monthly plans too!

ok thanks for letting me know these things. I might keep the hosting since i got a discount and i can run a few other sites here i guess that don’t use remote.

I think I will look at an alternative script tommorow or design and put that up for now… I think media plaza offer something similar…