Problem with php script (session error)

Discussion forum for MOD Writers regarding MOD Development.
Frode789
Registered User
Posts: 119
Joined: Sun Jan 06, 2008 7:57 pm
Location: Norway

Problem with php script (session error)

Post by Frode789 »

Hi.

I am getting the following error:

Code: Select all

[phpBB Debug] PHP Warning: in file /includes/session.php on line 1035: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web212/b2122/ipg.wrathlegioncom/index.php:5)
 [phpBB Debug] PHP Warning: in file /includes/session.php on line 1035: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web212/b2122/ipg.wrathlegioncom/index.php:5)
 [phpBB Debug] PHP Warning: in file /includes/session.php on line 1035: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web212/b2122/ipg.wrathlegioncom/index.php:5)

Look here:
http://www.wrath-legion.com/

I am using a script to pull posts from the forum and post it on my main site. -->

Code: Select all

<?php
    /**
    *
    * @package phpBB3
    * @version $Id: articles.php,v1.0.0 2010/06/17 9:42 AM PPCW2 Exp $
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    *
    */

    /**
    * @ignore
    */
    define('FORUM_ID', 2);                    // Forum ID to get data from
    define('POST_LIMIT', 2);                  // How many to get
    define('PHPBB_ROOT_PATH', './forum/');   // Path to phpBB (including trailing /)
    define('PRINT_TO_SCREEN', true);         
    define('IN_PHPBB', true);
    $phpbb_root_path = PHPBB_ROOT_PATH;
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);
    include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
    include($phpbb_root_path . 'includes/bbcode.' . $phpEx);

    // Start session management
    $user->session_begin(false);
    $auth->acl($user->data);
    $user->setup('viewforum');

    $query = 
    "SELECT u.user_id, u.username, t.topic_title, t.topic_poster, t.forum_id, t.topic_id, t.topic_time, t.topic_replies, t.topic_first_post_id, p.poster_id, p.topic_id, p.post_id, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.post_time
    FROM ".USERS_TABLE." u, ".TOPICS_TABLE." t, ".POSTS_TABLE." p 
    WHERE u.user_id = t.topic_poster 
    AND u.user_id = p.poster_id 
    AND t.topic_id = p.topic_id 
    AND p.post_id = t.topic_first_post_id 
    AND t.forum_id = ".FORUM_ID." 
    ORDER BY t.topic_time DESC";

    $result = $db->sql_query_limit($query, POST_LIMIT);
    $posts = array();
    $news = array();
    $bbcode_bitfield = '';
    $message = '';
    $poster_id = 0;



    while ($r = $db->sql_fetchrow($result))
    {
       $posts[] = array(
             'topic_id' => $r['topic_id'],
             'topic_time' => $r['topic_time'], 
             'username' => $r['username'], 
             'topic_title' => $r['topic_title'], 
             'post_text' => $r['post_text'],
             'post_time' => $user->format_date($r['post_time']),
             'bbcode_uid' => $r['bbcode_uid'],
             'bbcode_bitfield' => $r['bbcode_bitfield'],
             'topic_replies' => $r['topic_replies'],
             );
       $bbcode_bitfield = $bbcode_bitfield | base64_decode($r['bbcode_bitfield']);
    }


    // Instantiate BBCode
    if ($bbcode_bitfield !== '')
    {
       $bbcode = new bbcode(base64_encode($bbcode_bitfield));
    }

    // Output the posts
    foreach($posts as $m)
    {
       $poster_id = $m['user_id'];
       $post_char = '300';
       //$message = $m['post_text'] = substr($m['post_text'], 0, $post_char) . '<br>...';
       $message = explode('[break]', $m['post_text']); 
       if($m['bbcode_bitfield'])
       {
          $bbcode->bbcode_second_pass($message, $m['bbcode_uid'], $m['bbcode_bitfield']);
       }

       $message = str_replace("\n", '<br />', $message);
       $message = smiley_text($message);

       $comment = ($m['topic_replies']==0) ? 'comment' : 'Replies';
       
       if( PRINT_TO_SCREEN )
       {
    echo "<br><div id=\"google{postrow.POST_ID}\" class=\"post bg1 online\">\n"; 
    echo "        <div class=\"inner\"><span class=\"corners-top\"><span></span></span>\n"; 
    echo "        <div class=\"postbody\">\n"; 
    echo "        \n"; 
    echo "<h3 class=\"first\"> <a href=\"".PHPBB_ROOT_PATH."viewtopic.php?f=".FORUM_ID."&t={$m['topic_id']}\">{$m['topic_title']}</a></h3>\n";
    echo "{$message[0]}"; 
    echo "<br>\n";
    echo "<br>\n";
    echo "\n"; 
    echo "        </div>\n"; 
    echo "\n"; 
    echo "            <dl class=\"postprofile\" id=\"profile{postrow.POST_ID}\">\n"; 
    echo "            <dt>\n"; 
    echo "<br>\n";
    echo "<br>\n";
    echo "<br>\n";
    echo "        <th align=\"right\" width=\"40%\">&nbsp;<strong>Posted by: {$m['username']} </strong><br></th>\n"; 
    echo "                at {$m['post_time']}<br />\n"; 
    echo "            </dt>\n"; 
    echo "\n"; 
    echo "        <dd>&nbsp;</dd>\n"; 
    echo "        </dl>\n"; 
    echo "\n"; 
    echo "\n"; 
    echo "<div class=\"back2top\">\n";
    echo "                <td align=\"right\" class=\"top\">Replies: {$m['topic_replies']} | <a href=\"./posting.php?mode=reply&f=".FORUM_ID."&t={$m['topic_id']}\">Post reply</a> | ";
    echo "<td class=\"postbody\"><a href=\"".PHPBB_ROOT_PATH."viewtopic.php?f=".FORUM_ID."&t={$m['topic_id']}\">View full thread</a>";
    echo "    </td>\n";
    echo "    </div>\n"; 
    echo "        \n"; 
    echo "        \n"; 
    echo "\n"; 
    echo "        <span class=\"corners-bottom\"><span></span></span></div>\n"; 
    echo "    </div>\n"; 
    echo "\n"; 
    echo "    <hr class=\"divider\" />\n";

       }
    }
?> 			
Last edited by Frode789 on Sun Jan 01, 2012 3:56 pm, edited 1 time in total.
User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: Problem with php script (session error)

Post by John P »

This script doesn't give this error so is it the same?

I'm wondering why you start twice setup()?

According to the error it should be in index.php line 5, probably a space I think
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign
Frode789
Registered User
Posts: 119
Joined: Sun Jan 06, 2008 7:57 pm
Location: Norway

Re: Problem with php script (session error)

Post by Frode789 »

Ah bugger, I removed the script. Back up now :p

Hm, space? On line 5 I have this code in index.php:

Code: Select all

<script type="text/javascript" src="http://static.yg.com/js/exsyndication.js"></script>
User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: Problem with php script (session error)

Post by John P »

I see this on line 5

* @version $Id: articles.php,v1.0.0 2010/06/17 9:42 AM PPCW2 Exp $
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign
Frode789
Registered User
Posts: 119
Joined: Sun Jan 06, 2008 7:57 pm
Location: Norway

Re: Problem with php script (session error)

Post by Frode789 »

EDIT: Thought it was fixed, but apparently not.
Last edited by Frode789 on Mon Jan 02, 2012 1:05 pm, edited 1 time in total.
User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: Problem with php script (session error)

Post by John P »

I still see the same problem
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign
Frode789
Registered User
Posts: 119
Joined: Sun Jan 06, 2008 7:57 pm
Location: Norway

Re: Problem with php script (session error)

Post by Frode789 »

What does it mean?... :?
User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: Problem with php script (session error)

Post by John P »

Simple, its not working right yet
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign
Frode789
Registered User
Posts: 119
Joined: Sun Jan 06, 2008 7:57 pm
Location: Norway

Re: Problem with php script (session error)

Post by Frode789 »

Stef775 wrote:Simple, its not working right yet
Yes clearly, but why?

(I am noob :\)
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52169
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Problem with php script (session error)

Post by Brf »

It is not working because you have this on line 5:
Frode789 wrote:On line 5 I have this code in index.php:

Code: Select all

<script type="text/javascript" src="http://static.yg.com/js/exsyndication.js"></script>
The phpBB sessions code has to be first.
User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: Problem with php script (session error)

Post by John P »

Brf wrote:It is not working because you have this on line 5:
Frode789 wrote:On line 5 I have this code in index.php:

Code: Select all

<script type="text/javascript" src="http://static.yg.com/js/exsyndication.js"></script>
The phpBB sessions code has to be first.
Where do you guys see that line. I must be blind but I can not find this line in the script he posted above!!
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52169
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Problem with php script (session error)

Post by Brf »

Stef775 wrote:Where do you guys see that line.
Only the PHP part is posted above. Frode789 did not realize he needed to count the entire file, not just the PHP part.
User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: Problem with php script (session error)

Post by John P »

Ok I give it over to you in that way
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign
Frode789
Registered User
Posts: 119
Joined: Sun Jan 06, 2008 7:57 pm
Location: Norway

Re: Problem with php script (session error)

Post by Frode789 »

Brf wrote:It is not working because you have this on line 5:
Frode789 wrote:On line 5 I have this code in index.php:

Code: Select all

<script type="text/javascript" src="http://static.yg.com/js/exsyndication.js"></script>
The phpBB sessions code has to be first.
Aaah. Hmm, well.. I have several scripts before the php script. So I need to split the script up then? (have the php session part first in the head section, and then the other parts where I want the result to show up?)

Here is my complete index file by the way:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<script type="text/javascript" src="http://static.yg.com/js/exsyndication.js"></script>
<script type="text/javascript">
    YG.UserSettings.Syndication =
    {
        removeClasses: ['style6 style7'],
        defaultClass: 'yg-iconmedium',
        clearTitle: true
    }
</script>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<!-- google_ad_section_start -->
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
<meta content="en-us" http-equiv="Content-Language" />
<meta content="Home page of the MMO guild Wrath for Rift" name="description" />
<meta content="Aion News, Wrath news, guild applications, vent server, in game events, MMORPG, Rift, server status rift, recruitment rift" name="keywords" />
<meta content="Intoxicated" name="Frode" />

<!-- google_ad_section_end -->
<title>Wrath - Rift Guild</title>
<link href="style.css" rel="stylesheet" />
<!--[if IE 6]>
<link href="styleie6.css" rel="stylesheet" />
<![endif]-->
<style type="text/css">
.style1 {
	color:green;
}
.style2 {
	color:#FFCC00;
}
.style3 {
	color:red;
}
.style6 {
	text-decoration: underline;
}
.style7 {
	color: #ffffff;
}
</style>
</head>

<body>


<div id="wrap">
	<div id="header">
	</div>
	<div id="menu">
		<ol>
			<li><a href="index.php">home</a></li>
			<li><a href="/forum">forum</a></li>
			<li><a href="members.php">members</a></li>
			<li><a href="ranks.php">ranks</a></li>
			<li><a href="rules.php">rules</a></li>
			<li><a href="join.php">join</a></li>
		</ol>
		<div class="cLeft">
		</div>
	</div>
	<div id="content">
		<div id="leftColumn">
			<div class="box">
				<div class="boxTitle">
					<h3 class="style7">wrath recruitment</h3>
				</div>
				<div class="boxContent">
					<p>&nbsp;</p>
					<table>
						<tbody>
						<tr>
							<td style="width: 209px"><strong>Class</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
							</td>
							<td><strong>Status</strong>&nbsp;&nbsp;&nbsp; </td>
						</tr>
						<tr>
							<td style="width: 209px">
							<img alt="" height="38" src="images/TERA_Fansite_Kit/warrior_small.jpg" width="40" /> 
							Warrior </td>
							<td class="style1">High</td>
						</tr>
						<tr>
							<td style="width: 209px; height: 16px;">
							<img alt="" height="38" src="images/TERA_Fansite_Kit/lancer_small.jpg" width="40" /> 
							Lancer</td>
							<td class="style1">High</td>
						</tr>
						<tr>
							<td style="width: 209px; height: 16px;">
							<img alt="" height="43" src="images/TERA_Fansite_Kit/berserker_small.jpg" width="40" /> 
							Berserker</td>
							<td class="style1">High</td>
						</tr>
						<tr>
							<td style="width: 209px; height: 16px;">
							<img alt="" height="40" src="images/TERA_Fansite_Kit/slayer_small.jpg" width="40" /> 
							Slayer</td>
							<td class="style1">High</td>
						</tr>
						<tr>
							<td style="width: 209px">
							<img alt="" height="43" src="images/TERA_Fansite_Kit/priest_small.jpg" width="40" /> 
							Priest</td>
							<td class="style1">High</td>
						</tr>
						<tr>
							<td style="width: 209px">
							<img alt="" height="41" src="images/TERA_Fansite_Kit/archer_small.jpg" width="40" /> 
							Archer</td>
							<td class="style1">High</td>
						</tr>
						<tr>
							<td style="width: 209px">
							<img alt="" height="43" src="images/TERA_Fansite_Kit/mystic_small.jpg" width="40" /> 
							Mystic</td>
							<td class="style1">High</td>
						</tr>
						<tr>
							<td style="width: 209px">
							<img alt="" height="42" src="images/TERA_Fansite_Kit/sorcerer_small.jpg" width="40" /> 
							Sorcerer</td>
							<td class="style1">High</td>
						</tr>

						<tr>
							<td style="width: 209px">
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="/join.php"><strong>
							Join!</strong></a></td>
							<td>
							&nbsp;</td>
						</tr>
					</tbody>
					</table>
				<p>&nbsp;</p></div>
			</div>
			<div class="box">
				<div class="boxTitle">
					<h3 class="style7">site poll</h3>
				</div>
				<div class="boxContent">
<?php
/* Include this before your html code */
include_once "./poll/db/poll_cookie.php";
?>
<?php
/* path */
$poll_path = dirname(__FILE__);

require_once $poll_path."/poll/db/include/config.inc.php";
require_once $poll_path."/poll/db/include/$POLLDB[class]";
require_once $poll_path."/poll/db/include/class_poll.php";
$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();

$php_poll = new poll();

/* poll */
$php_poll->set_template_set("plain");
$php_poll->set_max_bar_length(125);
$php_poll->set_max_bar_height(10);
if (isset($_GET['poll_id'])) {
   echo $php_poll->poll_process($_GET['poll_id']);
} else {
   echo $php_poll->poll_process("random");
}

?>
				</div>
			</div>
		</div>
		<div id="rightColumn">
			<div class="box">
				<div class="box">
					<div class="boxTitle">
						<h3 class="style7">rift server status</h3>
					</div>
					<div class="boxContent">
<script type="text/javascript">window.statusTimer = setInterval("document.getElementById('riftss_"+626+"').src='http://www.enjin.com/tools/serverstatus/status.png?s="+626+"&t='+(new Date().getTime());", 60000);</script><div style="padding:10px;background:#FFFFFF;color:#000000;"><table><tbody><tr><td style="width: 41px;"><a href="http://www.enjin.com" style="color:#FFFFFF;"><img id="riftss_626" src="http://www.enjin.com/tools/serverstatus/status.png?s=626" style="height:41px; width:41px;" /></a></td><td style="padding-left:7px;"><div class="server-name" style="font-size:14px; margin-bottom:6px;">Bloodiron</div>
							<div>Our guild play on Bloodiron</div></td></tr></tbody></table></div>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="boxTitle">
					<h3 class="style7">Advertisement</h3>
				</div>
				<div class="boxContent">
				</div>
			</div>
		</div>
		<div id="mainColumn">
			<div class="mainSeparator">
				<h3 class="style7">latest rift NEWS</h3>
			</div>
			<div class="advertisementBanner">
<script src="swfobject.js" type="text/javascript"></script>
<div id="container">If you can see this text then you have not installed Flash Player. Please 
	<a href="http://get.adobe.com/flashplayer/">download it</a></div>
<script type="text/javascript">
var s1 = new SWFObject("imagerotator.swf","rotator","379","250","7");
s1.addParam("usefullscreen","false");
s1.addParam("allowfullscreen","false");
s1.addParam('allowscriptaccess','always');
s1.addVariable("file","news.xml");
s1.addVariable("width","379");
s1.addVariable("height","250");
s1.addVariable("showicons","false");
s1.addVariable('shownavigation','true');
s1.addVariable('linkfromdisplay','true');
s1.addVariable('linktarget','_blank');
s1.addVariable('rotatetime','5');
s1.addVariable('transition','blocks');
s1.addVariable('repeat','true');
s1.write("container");
</script>
				<!-- google_ad_section_start -->
			</div>
			<div class="mainSeparator">
				<h3 class="style7">click on the image to read the full article!</h3>
			</div>
			<div class="headline">
				<div class="headlineTitle">
					<h3>Guild News</h3>
				</div>
				<div class="headlineContent">
					<div class="headlineInfo">
						<ol>
							<li><span>Posted by:</span> <span class="red">Tex</span></li>
							<li><span>On:</span> 02/01/2012</li>
						</ol>
						<strong>Guild site is up!&nbsp; 
						<br /><br /><br /></strong>The new site and forum is up, 
						fully revamped and ready for Tera.<br /><br />Comments? <span class="style6">
						<strong>
						<a href="http://wrath-legion.com/forums/viewtopic.php?f=4&t=12">Post them here</a></strong></span><br />
						<p>
						--------------------------------------------------------------------------</p>
						<br />
					</div>
				</div>
			</div>
			<div class="headline">
				<div class="headlineTitle">
					<h3>Forum News</h3>
				</div>
				<div class="headlineContent">
					<div class="headlineInfo">
<?php
    /**
    *
    * @package phpBB3
    * @version $Id: articles.php,v1.0.0 2010/06/17 9:42 AM PPCW2 Exp $
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    *
    */

    /**
    * @ignore
    */
    define('FORUM_ID', 2);                    // Forum ID to get data from
    define('POST_LIMIT', 2);                  // How many to get
    define('PHPBB_ROOT_PATH', './forum/');   // Path to phpBB (including trailing /)
    define('PRINT_TO_SCREEN', true);         
    define('IN_PHPBB', true);
    $phpbb_root_path = PHPBB_ROOT_PATH;
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);
    include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
    include($phpbb_root_path . 'includes/bbcode.' . $phpEx);

    // Start session management
    $user->session_begin(false);
    $auth->acl($user->data);
    $user->setup('viewforum');

    $query = 
    "SELECT u.user_id, u.username, t.topic_title, t.topic_poster, t.forum_id, t.topic_id, t.topic_time, t.topic_replies, t.topic_first_post_id, p.poster_id, p.topic_id, p.post_id, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.post_time
    FROM ".USERS_TABLE." u, ".TOPICS_TABLE." t, ".POSTS_TABLE." p 
    WHERE u.user_id = t.topic_poster 
    AND u.user_id = p.poster_id 
    AND t.topic_id = p.topic_id 
    AND p.post_id = t.topic_first_post_id 
    AND t.forum_id = ".FORUM_ID." 
    ORDER BY t.topic_time DESC";

    $result = $db->sql_query_limit($query, POST_LIMIT);
    $posts = array();
    $news = array();
    $bbcode_bitfield = '';
    $message = '';
    $poster_id = 0;



    while ($r = $db->sql_fetchrow($result))
    {
       $posts[] = array(
             'topic_id' => $r['topic_id'],
             'topic_time' => $r['topic_time'], 
             'username' => $r['username'], 
             'topic_title' => $r['topic_title'], 
             'post_text' => $r['post_text'],
             'post_time' => $user->format_date($r['post_time']),
             'bbcode_uid' => $r['bbcode_uid'],
             'bbcode_bitfield' => $r['bbcode_bitfield'],
             'topic_replies' => $r['topic_replies'],
             );
       $bbcode_bitfield = $bbcode_bitfield | base64_decode($r['bbcode_bitfield']);
    }


    // Instantiate BBCode
    if ($bbcode_bitfield !== '')
    {
       $bbcode = new bbcode(base64_encode($bbcode_bitfield));
    }

    // Output the posts
    foreach($posts as $m)
    {
       $poster_id = $m['user_id'];
       $post_char = '300';
       //$message = $m['post_text'] = substr($m['post_text'], 0, $post_char) . '<br>...';
       $message = explode('[break]', $m['post_text']); 
       if($m['bbcode_bitfield'])
       {
          $bbcode->bbcode_second_pass($message, $m['bbcode_uid'], $m['bbcode_bitfield']);
       }

       $message = str_replace("\n", '<br />', $message);
       $message = smiley_text($message);

       $comment = ($m['topic_replies']==0) ? 'comment' : 'Replies';
       
       if( PRINT_TO_SCREEN )
       {
    echo "<br><div id=\"google{postrow.POST_ID}\" class=\"post bg1 online\">\n"; 
    echo "        <div class=\"inner\"><span class=\"corners-top\"><span></span></span>\n"; 
    echo "        <div class=\"postbody\">\n"; 
    echo "        \n"; 
    echo "<h3 class=\"first\"> <a href=\"".PHPBB_ROOT_PATH."viewtopic.php?f=".FORUM_ID."&t={$m['topic_id']}\">{$m['topic_title']}</a></h3>\n";
    echo "{$message[0]}"; 
    echo "<br>\n";
    echo "<br>\n";
    echo "\n"; 
    echo "        </div>\n"; 
    echo "\n"; 
    echo "            <dl class=\"postprofile\" id=\"profile{postrow.POST_ID}\">\n"; 
    echo "            <dt>\n"; 
    echo "<br>\n";
    echo "<br>\n";
    echo "<br>\n";
    echo "        <th align=\"right\" width=\"40%\">&nbsp;<strong>Posted by: {$m['username']} </strong><br></th>\n"; 
    echo "                at {$m['post_time']}<br />\n"; 
    echo "            </dt>\n"; 
    echo "\n"; 
    echo "        <dd>&nbsp;</dd>\n"; 
    echo "        </dl>\n"; 
    echo "\n"; 
    echo "\n"; 
    echo "<div class=\"back2top\">\n";
    echo "                <td align=\"right\" class=\"top\">Replies: {$m['topic_replies']} | <a href=\"./posting.php?mode=reply&f=".FORUM_ID."&t={$m['topic_id']}\">Post reply</a> | ";
    echo "<td class=\"postbody\"><a href=\"".PHPBB_ROOT_PATH."viewtopic.php?f=".FORUM_ID."&t={$m['topic_id']}\">View full thread</a>";
    echo "    </td>\n";
    echo "    </div>\n"; 
    echo "        \n"; 
    echo "        \n"; 
    echo "\n"; 
    echo "        <span class=\"corners-bottom\"><span></span></span></div>\n"; 
    echo "    </div>\n"; 
    echo "\n"; 
    echo "    <hr class=\"divider\" />\n";

       }
    }
?> 			

						<!-- google_ad_section_end --></div>
				</div>
			</div>
		</div>
		<div id="footer">
			<img alt="" height="33" src="images/footer.jpg" width="839" /></div>
	</div>
</div>

</body>

</html>
User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: Problem with php script (session error)

Post by John P »

Agree with brf, first your php code, then output like the error is telling you!

Why don't you use the template system?
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign
Locked

Return to “[3.0.x] MOD Writers Discussion”