home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

rss feed and phpbb

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2790
Discussions: 200,966, Posts: 2,379,646, Members: 246,332
Old July 21st, 2005, 12:05 PM   Digg it!   #1 (permalink)
Registered User
 
Join Date: Oct 2001
Posts: 4,097
rss feed and phpbb

Hello,

I am using phpbb to power my forum. I have installed a mod that creates an rss feed.

I get this error when I try to view the rss.php page:

Code:
The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. 


--------------------------------------------------------------------------------

Only one top level element is allowed in an XML document. Error processing resource 'http://www.somethingcom/rss.php'. Line 2, Position 2 

<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/something/public_html/rss.php</b> on line <b>136</b><br />
-^
Here is the offending code I presume:

Code:
//
// BEGIN Session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);


if (!isset($_SERVER['PHP_AUTH_USER'])) {
         Header("WWW-Authenticate: Basic realm=\"PHPbb2 RSS-Syndicator\"");
	 Header("HTTP/1.0 401 Unauthorized");
	 echo "If you haven't an account, plz use guest / guest for authentication!\n";
	 exit;
} else {
	$userdata['username'] = $_SERVER['PHP_AUTH_USER'];
	$userdata['user_password'] = md5($_SERVER['PHP_AUTH_PW']); 

	$query = "SELECT user_id as user_id,user_active as user_active, user_level as user_level FROM ".USERS_TABLE." WHERE username='".str_replace("\\'", "''", $userdata['username'])."' and user_password='".str_replace("\\'", "''", $userdata['user_password'])."'" ;
	$result = $db->sql_query($query);
	$the_id = $db->sql_fetchrow($result);

	$userdata['user_id']=$the_id['user_id'];
	$userdata['user_active']=$the_id['user_active'];
	$userdata['user_level'] =$the_id['user_level'];
	$userdate['session_logged_in']=1;

	if ($userdata['user_id']==0) die();

	$db->sql_freeresult();unset($the_id);


	$is_auth = array();
	foreach ($forum_id as $key => $value ) {
		$is_auth = auth(AUTH_ALL, $value, $userdata, $forum_row); 
	}
} 
//
// End session management
//
ClubMed is offline   Reply With Quote
Old July 21st, 2005, 01:57 PM     #2 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,552
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
The error appears to be in the XSL document that is being attached to the XML feed. Look in the display code for attachment to an XSL and find that document.

Unless of course $forum_id is not in your scope, it isn't in that code block

Jkrohn
jkrohn is offline   Reply With Quote
Old July 25th, 2005, 07:43 PM     #3 (permalink)
Registered User
 
Join Date: Oct 2001
Posts: 4,097
What happens if i remove:

Code:
 foreach ($forum_id as $key => $value ) {
  $is_auth = auth(AUTH_ALL, $value, $userdata, $forum_row); 
 }
ClubMed is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
RSS - Your Favorite/Best RSS Webfeeds BeatYouWithShoe General Tech Discussion 3 June 1st, 2005 05:44 AM
Question about RSS (Textcasting?) byunews General Tech Discussion 0 March 25th, 2005 05:10 PM
RSS Readers? Undeadlord Applications and Operating Systems 2 February 22nd, 2005 10:13 PM
RSS Introduction Scott Tiger General Tech Discussion 3 March 17th, 2004 01:27 PM
rss feeds suzi Webmastering and Programming 0 February 1st, 2003 08:28 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3014)
Forty-six years ago today (9)
The disrespect of Obama by Russian .. (46)
Laptop with wireless problem. (12)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Internet Lost (5)
windows 7 problem (7)
windows vista security holes (15)
Point and Shoot Camera Suggestions. (6)
Is the PSU I received dead? (13)
radeon x850xt platinum & shader.. (6)
HIS HD5770 graphic card question (15)
Recent Discussions
Open With ..... Win7 (3)
windows vista security holes (15)
Help getting around port 80 for camer.. (4)
Laptop with wireless problem. (12)
Internet Lost (5)
Skillsoft Network+ Study Software Que.. (9)
virus blocking exe. files (1)
Point and Shoot Camera Suggestions. (6)
CPU fan stops spinning randomly (11)
Nvidia GTX 260 problem (1)
Modern Warfare 2: Who Bought It? (65)
Is the PSU I received dead? (13)
Print spooler problem (16)
Kingston Bluetooth Dongle Driver (1)
Multiple Restarts Required at Boot (3)
webcam (0)
upgrade for hp a6101 (0)
tv not turn on-makes clicking sound (2)
EVGA 9800 gtx help with finding a goo.. (11)
Regular Build (11)
Help with onclick and buttons (0)
Virus advise (8)
My monitor won't turn on after instal.. (1)
Dept. of HS: NSA 'Helped' Develop Vis.. (16)
Ideal cheap graph card for PC-Gaming? (18)


All times are GMT -4. The time now is 03:17 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28