ZingZangTop Posted February 21, 2013 Share Posted February 21, 2013 I'm trying to install this rss reader into an Elgg system. http://www.w3schools.com/php/php_ajax_rss_reader.asp But I'm getting these error messages: Warning: DOMDocument::load() [domdocument.load]: URL file-access is disabled in the server configuration in/home/www/mydomain.com/news/getrss.php on line 16 Warning: DOMDocument::load(http://search.popurls.com/rss/apple) [domdocument.load]: failed to open stream: no suitable wrapper could be found in /home/www/mydomain.com/news/getrss.php on line 16 Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "http://search.popurls.com/rss/apple" in/home/www/mydomain.com/news/getrss.php on line 16 Fatal error: Call to a member function getElementsByTagName() on a non-object in/home/www/mydomain.com/news/getrss.php on line 20 Is that something anyone can help with, or am I not supplying you with enough information? Any help or comment is deeply appreciated. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/ Share on other sites More sharing options...
requinix Posted February 21, 2013 Share Posted February 21, 2013 Seems you have allow_url_fopen turned off. Contact your host and see if they can get that restriction removed for you. Or try cURL and DOMDocument::loadXML(). Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414039 Share on other sites More sharing options...
exeTrix Posted February 21, 2013 Share Posted February 21, 2013 I've just tried to get the feed on my machine and the file is loaded fine. One thing I noticed is that the http://search.popurls.com/rss/apple is displaying the page with HTML. If you have control of that page then set the headers etc to XML. Could you post the source so we can assist you? Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414041 Share on other sites More sharing options...
ZingZangTop Posted February 22, 2013 Author Share Posted February 22, 2013 Thanks so much guys. I have contacted the host about it now. exeTrix, sorry I'm not sure what source are you referring to? The source of the php is taken from here: http://www.w3schools..._rss_reader.asp Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414061 Share on other sites More sharing options...
requinix Posted February 22, 2013 Share Posted February 22, 2013 (edited) FYI SimpleXML is much simpler to use. $xml = new SimpleXMLElement("rss source here since you can't use URLs", 0, false); // if you use a URL change false->true $channel = $xml->channel; echo "<p><a href='{$channel->link}'>{$channel->title}</a><br />{$channel->description}</p>\n"; foreach ($channel->item as $item) { echo "<p><a href='{$item->link}'>{$item->title}</a><br />{$item->description}</p>\n"; } And please try to avoid W3Schools. They have some good information and some bad information and if you're learning PHP it can be difficult to tell which is which. Edited February 22, 2013 by requinix Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414065 Share on other sites More sharing options...
ZingZangTop Posted February 22, 2013 Author Share Posted February 22, 2013 I'm getting the same error, even now I have turned on " allow_url_fopen ". Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414100 Share on other sites More sharing options...
requinix Posted February 22, 2013 Share Posted February 22, 2013 You sure about that? What does phpinfo() or ini_get() say? Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414102 Share on other sites More sharing options...
ZingZangTop Posted February 22, 2013 Author Share Posted February 22, 2013 Yes I'm afraid so requinix. Thanks so much for your help. I'm probably doing something totally moronic somewhere, half dressed, spilling coffee on my t-shirt. But here's from a fresh phpinfo: (main domain showing content from a folder on a subdomain, relevant? (he asks trembling)). allow_url_fopen On On How would I go about finding crazy fanatic Apple fanboys (like myself), who refuse to listen to 'reason' ....and who also knows php ? We need 'developers developers developers developers' to quote Mr. Ballmer. I've been working on a social network site for Apple users for 5 years. Unfortunately I wasted years on the Ning platform, but it taught me html and css, while php to me still looks like the aliens have landed and taken over digital print as we know it. In january I switched to Elgg (a homebrewed 'thinking different' way of using it) and basically changed it from a social network to a social network platform, in the sense that anyone now can create their own community space. A programmer has been helping (20 hour shifts for about a month, and is now burned out in a retirement home). Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414104 Share on other sites More sharing options...
requinix Posted February 22, 2013 Share Posted February 22, 2013 So to be sure, you're still getting the "URL file-access is disabled" message? With a bit of digging it seems that message only happens when you try to include() a php:// URL. What version of PHP are you using? What's the code? Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414195 Share on other sites More sharing options...
ZingZangTop Posted February 22, 2013 Author Share Posted February 22, 2013 I have been getting 500 errors all day and 10 - 20 second load times, as soon as I turned off allow_url_fopen again, it was back to normal. Speedy loading and no server 500 errors. Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414202 Share on other sites More sharing options...
ZingZangTop Posted February 22, 2013 Author Share Posted February 22, 2013 Thanks for getting back to me requinix! I'm using the code linked at the top of the thread: http://www.w3schools..._rss_reader.asp Maybe the problem is in how I add the getrss.php file to the Elgg root folder on my server, and add the script and html via an Elgg plugin (AnyPage), but I had a complete solution running prior with javascript and rssinclude.com - but now we wanna try and build our own solution with php and database instead. This here is just the first step in a process. Unfortunately it's already causing problems as you can see. Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414205 Share on other sites More sharing options...
requinix Posted February 23, 2013 Share Posted February 23, 2013 Maybe the problem is in how I add the getrss.php file to the Elgg root folder on my server, and add the script and html via an Elgg plugin (AnyPage), How does that work? Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414510 Share on other sites More sharing options...
ZingZangTop Posted February 23, 2013 Author Share Posted February 23, 2013 It doesn't ! Honestly I have very little understanding about whether or not I'm allowed to put this file inside an www.elgg.org installation. We just had another developer join us, and we are still looking for more. I hope we gonna crack it. requinix you da bomb. Thanks so much for your eager to help out. I wish you were a Mac-Unix user so you could join us ! Quote Link to comment https://forums.phpfreaks.com/topic/274800-problems-with-rss-reader-in-elgg/#findComment-1414511 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.