Hi I am trying to get an RSS feed going on dreamhost. The code I use works perfectly well on two other servers, but when I set it up on Dreamhost I get the following error. Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /home/.cattelina/???/???.eu/index.php on line 65 Warning: fopen(http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/business/rss.xml) [function.fopen]: failed to open stream: no suitable wrapper could be found in /home/.cattelina/???/???.eu/index.php on line 65 Error reading RSS data. (my line 66 is a simple: or die("Error reading RSS data."); Any idea what the problem is or/and the best way to report this to dreamhost, I've found their support to generally be very deep and confusing in the past so I want to be sure I'm asking the right question.
Dreamhost has some odd rules on which PHP commands you can use. Very annoying at times. I'm guessing from the "URL file-access is disabled in the server configuration" part that this is the issue you're dealing with. When I ran into it, I got an answer that it was something or other to do with security. Sorry, it's been several months now, so I don't recall exactly what they told me. Basically, they don't like to let you use PHP commands to show information from other sites. No good workarounds that I know of.
Thanks for the reply. I'll shoot them an email and see if they are prepared to do anything about it. Using RSS nowadays is commonplace. I wouldn't even mind if there was a restriction on RSS Bandwidth, all I'm trying to do is keep page content fresh with a simple stream at the bottom.
Dreamhost has fopen turned off gobally in the php build. However by using curl you can get around this. Got $10 that says any response from them will be pretty much exactly that Noppid was kind enough to write up a quick curl workaround the fopen to get the co-op ads script to work properly for my sites hosted there... I'm sure the same technique can be applied to fetching the desired RSS feed.
yeah you're right that's the reply that I got. No RSS together with an awful control panel, but unlimited domain name. It's all swings and roundabouts!
So do I get my $10? Seriously, if you want to shoot me the fopen line of your code to fetch the feed, I think I can rewrite it with curl to pull it down for you.
That info helped me. In my case fopen just failed with no meaningfull warning. So I asked my hosting company to enabled URL file-access. And they did. Now it's OK.