Previous Thread
Next Thread
Print Thread
Hop To
[FIXED in b5] Error at Control Panel #1372 07/18/2006 10:43 PM
Joined: Jun 2006
Posts: 90
d-talk Offline OP
journeyman
OP Offline
journeyman
Joined: Jun 2006
Posts: 90
Hi everyone,

when I enter the control Panel I get the following error:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /var/www/web10/html/libs/ubbthreads.inc.php on line 2997

Warning: file_get_contents(http://www.ubbcentral.com/boards/ContentIslands/1_rss20.xml) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /var/www/web10/html/libs/ubbthreads.inc.php on line 2997

Warning: Invalid argument supplied for foreach() in /var/www/web10/html/admin/login.php on line 313

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web10/html/libs/ubbthreads.inc.php:2997) in /var/www/web10/html/libs/ubbthreads.inc.php on line

What can I do?

Last edited by Rick; 09/08/2006 6:27 PM.
Re: Error at Control Panel [Re: d-talk] #1373 07/18/2006 11:46 PM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
Yeah, what it's supposed to be doing is grabbing the rss feed from ubbcentral so anytime you go into the control panel you'll see the latest news and announcements. We do this with a remote file_get_contents. This is disabled on some servers like yours in the php.ini file. We'll probably have to do this a bit differently.

Re: Error at Control Panel [Re: Rick] #1380 07/19/2006 8:14 AM
Joined: Jun 2006
Posts: 34
Peter Offline
newbie
Offline
newbie
Joined: Jun 2006
Posts: 34
I have the same problem.
Is there a work-around for this that can be used, or do we have to wait for next beta release?

Re: Error at Control Panel [Re: Peter] #1388 07/19/2006 9:32 AM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
The only way would be if you have access to your php.ini file. You could then set allow_url_fopen to true to enable it. Other than that, this will need to wait until the next beta.

Re: Error at Control Panel [Re: Rick] #1446 07/19/2006 3:35 PM
Joined: Jun 2006
Posts: 46
Jamin Offline
newbie
Offline
newbie
Joined: Jun 2006
Posts: 46
Wordpress's dashboard RSS feed works fine on my server, but Threads' feed doesn't - gives the errors d-talk listed above. So however Wordpress is doing it may be a little more forgiving.

Just a thought, if you're in need of ways to accomplish it. smile

---Jamin


"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
Re: Error at Control Panel [Re: Jamin] #1484 07/20/2006 12:40 AM
Joined: Jun 2006
Posts: 34
Peter Offline
newbie
Offline
newbie
Joined: Jun 2006
Posts: 34
I can now see that I don't have the exact same error output, but the first line is the same.

I made a temporary fix to comment line 2997, and then I was able to open up the Control Panel smile

(allow_url_fopen was already set to "On" in php.ini)

Re: Error at Control Panel [Re: Peter] #2147 08/01/2006 9:29 AM
Joined: Jun 2006
Posts: 34
Peter Offline
newbie
Offline
newbie
Joined: Jun 2006
Posts: 34
B2. When I try to access the Control Panel I get this error message, i.e. the same as before an only a new line number:

Quote:
Warning: file_get_contents(http://www.ubbcentral.com/boards/ContentIslands/1_rss20.xml): failed to open stream: Bad file descriptor in c:\prg1\apache group\apache\htdocs\ubbt\libs\ubbthreads.inc.php on line 3010

Fatal error: Maximum execution time of 30 seconds exceeded in c:\prg1\apache group\apache\htdocs\ubbt\libs\ubbthreads.inc.php on line 3010


Same code line causing the same problem.
Code
	$raw_data = file_get_contents(trim($xml_feed));


I'll solved the problem again by removing the specific line.


Re: Error at Control Panel [Re: Peter] #2150 08/01/2006 11:13 AM
Joined: Jul 2006
Posts: 4,062
Mark S Offline
Offline
Joined: Jul 2006
Posts: 4,062
I'm amazed this hasnt got me,
as i'm normally the one hit with Server if's n but's....

PHP Version 4.4.2
allow_url_fopen = on

But if i wanted to run these forums on PHP Version 5.1.4
which i could do with a HTACESS map.
Looks like i could be in trouble too.
allow_url_fopen = off

Being on a shared Server, i cant change the settings frown
I want to Run These forums on 5 when tesings finished.


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Re: Error at Control Panel [Re: Mark S] #2152 08/01/2006 11:34 AM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
This is one of the bugs that wasn't able to be fixed for beta 2. I need to rewrite this whole bit which is why it's not marked as fixed yet wink

Re: Error at Control Panel [Re: Rick] #2153 08/01/2006 12:13 PM
Joined: Jul 2006
Posts: 105
Philipp Offline
Member
Offline
Member
Joined: Jul 2006
Posts: 105
You could use curl with fallback to file_get_contents:

Code
function getFeed($xml_feed) {

	global $xml_data, $item_id;
	
	// Open connection to RSS XML file for parsing.
	if (function_exists("curl_init"))
    {
    	$feed = curl_init(trim($xml_feed));
    	curl_setopt($feed, CURLOPT_RETURNTRANSFER, 1);    			
    	$raw_data = curl_exec($feed);
    	curl_close($feed);    			  		
    }
    else
    {    			
		$raw_data = @file_get_contents(trim($xml_feed));
    }
    
    if (isset($raw_data))
    {
    	
		$xmlParser = xml_parser_create();
	
		// Set up element handler
		xml_set_element_handler( $xmlParser, "startElement", "endElement" );
	
		// Set up character handler
		xml_set_character_data_handler( $xmlParser, "charElement" );
	
		// Parse the data
		xml_parse( $xmlParser, $raw_data);
	
		// Free xml parser from memory
		xml_parser_free( $xmlParser );
		
    }
    else 
    {
    	$xml_data = array();
    }
    	
	return $xml_data;

} // end function getFeed

Re: Error at Control Panel [Re: Philipp] #2154 08/01/2006 12:30 PM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
That's a good idea Philipp. Will need to check and see how standard it is to have curl compiled in. If all else fails I'll probably fall back to just including an iframe with the latest posts, but would definitely prefer to stick with the rss contents if it's possible.

Re: Error at Control Panel [Re: Rick] #2344 08/05/2006 11:03 AM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
I think we'll give curl a shot for the next beta just to see how it works on a variety of servers.

Re: Error at Control Panel [Re: d-talk] #2486 08/10/2006 1:42 PM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
Can anyone that was getting this error in b1 and b2 check to see if this is working for them in b3?

Re: Error at Control Panel [Re: Rick] #2487 08/10/2006 2:35 PM
Joined: Jun 2006
Posts: 196
Ian Spence Offline
enthusiast
Offline
enthusiast
Joined: Jun 2006
Posts: 196
I still insist that

Code
<script type="text/javascript" src="https://www.ubbcentral.com/threadsfeed.js?time=<?php echo time(); ?>"></script>
Is still the best way to handle this.

No curl needed. No php settings need to be modified at all. Just a simple javascript include, with ?time= added so that it doesn't get cached.

Re: Error at Control Panel [Re: Ian Spence] #2490 08/10/2006 2:57 PM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
That would work, however I'm trying to only use things to accomplish this that are actually available from within .threads. That way when the questions come in on, how do you get the news to display in the control panel, I don't have to tell them it requires a hack/addmon. If all of this fails and it can't be done then I'll end up going that route.

Re: Error at Control Panel [Re: Rick] #2962 08/29/2006 12:20 AM
Joined: Jun 2006
Posts: 34
Peter Offline
newbie
Offline
newbie
Joined: Jun 2006
Posts: 34
I still have this problem in B4.

However, this time I don't get anything in the browser. It works for some time but then stops with an empty screen.

Things does however work if I remove the same line as I mentioned earlier, but now it is line 3037.

Re: Error at Control Panel [Re: Peter] #3104 09/08/2006 10:47 AM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
Ok, it looks like we'll probably need to go with a javascript or iframe solution. No way to get this reliably working on all systems with the current way.

Re: Error at Control Panel [Re: Rick] #3350 09/15/2006 8:06 AM
Joined: Jun 2006
Posts: 34
Peter Offline
newbie
Offline
newbie
Joined: Jun 2006
Posts: 34
Was this fixed in beta 5?
Ricks last comment does say "No", but the topic has been marked with "fixed in b5".

Directly after installing beta 5, I saw that this was working, however it took long time (at least 30 sec) before the control panel opened.

Now, or rather since yesterday, I was not able to open the control panel any more. When I tried to open it, the browser works for some time and then stops and leaves an empty white screen.
So I went into the code and removed samt line once more (in beta 5 it is line 3039), and then I was able to open the control panel.

As I can recall I see no difference between how the control panel looks now and before.
What is this "raw" line supposed to do?
Is it supposed to get the UBB Announcements or what? I still see them now, even with this line removed.

Re: Error at Control Panel [Re: Peter] #3363 09/15/2006 9:34 AM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
Woops, I switched the code to load them in an iframe, however I forgot to remove the code that tries to do it the old way.


Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Mobile app?
by Baldeagle - 12/06/2019 9:32 PM
How do you change Text Line spacing?
by jorb - 11/23/2019 12:14 AM
What happened to FAQ or Forum Help
by Ruben - 11/20/2019 11:58 AM
Search feature encountering an Error message
by jorb - 11/20/2019 12:06 AM
UBB Dev
by JAISP - 11/03/2019 11:01 AM
Who's Online Now
1 registered members (isaac), 90 guests, and 440 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191023)