Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 90
journeyman
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(https://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 7:27 PM.
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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.

Joined: Jun 2006
Posts: 34
newbie
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?

Peter #1388 07/19/2006 10:32 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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.

Joined: Jun 2006
Posts: 46
J
newbie
newbie
J Offline
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."
Joined: Jun 2006
Posts: 34
newbie
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)

Peter #2147 08/01/2006 10:29 AM
Joined: Jun 2006
Posts: 34
newbie
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(https://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.


Peter #2150 08/01/2006 12:13 PM
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
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
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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

Joined: Jul 2006
Posts: 116
Likes: 4
P
Member
Member
P Offline
Joined: Jul 2006
Posts: 116
Likes: 4
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

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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.

Rick #2344 08/05/2006 12:03 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
I think we'll give curl a shot for the next beta just to see how it works on a variety of servers.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Can anyone that was getting this error in b1 and b2 check to see if this is working for them in b3?

Joined: Jun 2006
Posts: 196
I
enthusiast
enthusiast
I Offline
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.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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.

Joined: Jun 2006
Posts: 34
newbie
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.

Peter #3104 09/08/2006 11:47 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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.

Joined: Jun 2006
Posts: 34
newbie
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.

Peter #3363 09/15/2006 10:34 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Havenofsobriety), 522 guests, and 99 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)