MyBB Community Forums

Full Version: bug on chat.php (PJIRC plugin)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The page WORK, but the header is:

Warning [2] Cannot modify header information - headers already sent by (output started at /var/www/forum/chat.php:1) - Line: 3093 - File: inc/functions.php PHP 5.2.0-8+etch13 (Linux)
File Line Function

[PHP] errorHandler->error
/inc/functions.php 3093 header
/global.php 44 send_page_headers
/chat.php 8 require_once
Warning [2] Cannot modify header information - headers already sent by (output started at /var/www/forum/chat.php:1) - Line: 3094 - File: inc/functions.php PHP 5.2.0-8+etch13 (Linux)
File Line Function
[PHP] errorHandler->error
/inc/functions.php 3094 header
/global.php 44 send_page_headers
/chat.php 8 require_once

Warning [2] Cannot modify header information - headers already sent by (output started at /var/www/forum/chat.php:1) - Line: 3095 - File: inc/functions.php PHP 5.2.0-8+etch13 (Linux)
File Line Function

[PHP] errorHandler->error
/inc/functions.php 3095 header
/global.php 44 send_page_headers
/chat.php 8 require_once
Warning [2] Cannot modify header information - headers already 
sent by (output started at /var/www/forum/chat.php:1) - Line: 3096 - File: inc/functions.php PHP 5.2.0-8+etch13 (Linux)

File Line Function
[PHP] errorHandler->error
/inc/functions.php 3096 header

/global.php 44 send_page_headers

/chat.php 8 require_once 

The source code of this page:


<?php
/*
Plugin PJIRC Chat
(c) 2006-2008 by MyBBoard.de
Website: http://www.mybboard.de
*/
define("IN_MYBB", 1);
require_once "global.php";
define("KILL_GLOBALS", 1);



// Plugin installiert?
if(!isset($mybb->settings['pjirc_onlymembers']))
{
	error("You have to activate the plugin!");
}

// Verbindungsdaten eingegeben?
if(empty($mybb->settings['pjirc_server']) || empty($mybb->settings['pjirc_channel']))
{
	error("You have to enter the server and the channel you want to connect with!");
}

// Navigation
add_breadcrumb("Chat");

// Nur Mitglieder?
if($mybb->settings['pjirc_onlymembers'] == "1")
{
    // Gäste ausschließen
    if ($mybb->user['uid'] == "0")
    {
		error_no_permission();
    }
}

// Gast?
if($mybb->user['uid'] == "0")
{
	$rand = rand(1000,9999);
	$username = "Visiteur".$rand."";
	$altusername = "Visiteur".$rand."";
	$usergroup = "Visiteur/Non connecter";
}
else
{
	// Benutzergruppe ermitteln
	$query = $db->query("SELECT title FROM ".TABLE_PREFIX."usergroups WHERE gid = '".$mybb->user['displaygroup']."' LIMIT 0,1");
	$get_groups = $db->fetch_array($query);

	$username = htmlspecialchars_uni($mybb->user['username']);
	$altusername = "".$mybb->user['username']."";
	$usergroup = htmlspecialchars_uni($get_groups['title']);
}

$ircserver = $mybb->settings['pjirc_server'];
$ircchannel = $mybb->settings['pjirc_channel'];

// Output
eval("\$chat = \"".$templates->get("pjirc_chat")."\";");
output_page($chat);
?>

Nobody ?
Hi ?????