Jump to content

Turn off PHP errors


jjmusicpro

Recommended Posts

I get a bunch of errors that are ok, how do i turn these off in my php.ini ?

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/vhosts/***************/httpdocs/themes/iCGstation/theme.php:85) in /usr/local/www/vhosts/************/httpdocs/includes/sessions.php on line 251

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/vhosts/*****************/httpdocs/themes/iCGstation/theme.php:85) in /usr/local/www/vhosts/****************/httpdocs/includes/sessions.php on line 252

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/vhosts/xxxxxxxxxxxx/httpdocs/themes/iCGstation/theme.php:85) in /usr/local/www/vhosts/xxxxxxxxxxxxxxxxxxx/httpdocs/modules/Forums/viewtopic.php on line 572

 

 

 

 

 

 

Link to comment
Share on other sites

That error suggests your are using the header() function to send HTTP headers to the server . header() can only be used before any output. From the error message you have posted, I can tell you that the output is on line 85 in themes/iCGstation/theme.php (this is the cause) however the error was triggered in includes/sessions.php on line 251.

Link to comment
Share on other sites

looks like you may have a BOMB or whatever they call it binary bomb or something

 

look for a space at the end of files included before redirect or files of where redirect happens or session starts or any file, spaces after the last bit of php or anything and comments do it too.

 

to turn errors off you say error_reporting(0);

 

ob_start may help u look into that but thats not a fix its a work around

Link to comment
Share on other sites

looks like you may have a BOMB or whatever they call it binary bomb or something

 

look for a space at the end of files included before redirect or files of where redirect happens or session starts or any file, spaces after the last bit of php or anything and comments do it too.

 

to turn errors off you say error_reporting(0);

 

ob_start may help u look into that but thats not a fix its a work around

 

where do i do that at? the error part? this is on a phpnuke type site

Link to comment
Share on other sites

the only include i see is this

include("themes/iCGstation/tables.php");

 

i looked in it, didnt see anything and now i get this error

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/vhosts/**************/httpdocs/themes/iCGstation/theme.php:52) in /usr/local/www/vhosts/**************/httpdocs/includes/sessions.php on line 251

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/vhosts/**************/httpdocs/themes/iCGstation/theme.php:52) in /usr/local/www/vhosts/**************/httpdocs/includes/sessions.php on line 252

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/vhosts/**************/httpdocs/themes/iCGstation/theme.php:52) in /usr/local/www/vhosts/**************/httpdocs/includes/page_header.php on line 494

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/vhosts/**************/httpdocs/themes/iCGstation/theme.php:52) in /usr/local/www/vhosts/**************/httpdocs/includes/page_header.php on line 500

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/vhosts/**************/httpdocs/themes/iCGstation/theme.php:52) in /usr/local/www/vhosts/**************/httpdocs/includes/page_header.php on line 501

 

<?php
$bgcolor1 = "#EAEAEA";
$bgcolor2 = "#EAEAEA";
$bgcolor3 = "#EAEAEA";
$bgcolor4 = "#EAEAEA";
$textcolor1 = "#000000";
$textcolor2 = "#000000";

include("themes/iCGstation/tables.php");

function themeheader() {
    global  $admin, $user, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous;

    $showbanners = ads(0);
        cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\">";

    if ($username == "Anonymous") {
$theuser = "  <a href=\"modules.php?name=Your_Account\">"._LOGIN."</a> or <a href=\"modules.php?name=Your_Account&op=new_user\">"._BREG."</a>";
    } else {
$theuser = "  "._BWEL." $username!";
    }
    
                	    $datetime = "<script type=\"text/javascript\">\n\n"
        ."<!--   // Array ofmonth Names\n"
        ."var monthNames = new Array( \""._JANUARY."\",\""._FEBRUARY."\",\""._MARCH."\",\""._APRIL."\",\""._MAY."\",\""._JUNE."\",\""._JULY."\",\""._AUGUST."\",\""._SEPTEMBER."\",\""._OCTOBER."\",\""._NOVEMBER."\",\""._DECEMBER."\");\n"
        ."var now = new Date();\n"
        ."thisYear = now.getYear();\n"
        ."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
        ."document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n"
        ."// -->\n\n"
        ."</script>";
        
    $public_msg = public_message();
    $tmpl_file = "themes/iCGstation/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    blocks('left');
    $tmpl_file = "themes/iCGstation/left_center.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}
function themefooter() {
    global $index, $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
    if (defined('INDEX_FILE')) { 
$tmpl_file = "themes/iCGstation/center_right.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
blocks('right');
    }	

echo"				</td>"
  . "			</tr>"
  . "		</table>"
  . "		<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"
  . "		  <tr> "
  . "			<td align=\"right\"><a href=\"#top\"><img src=\"themes/iCGstation/forums/images/top.gif\" border=\"0\" /></a></td>"
  . "		  </tr>"
  . "		</table>"
  . "		<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"
  . "		  <tr> "
  . "			<td><a href=\"http://www.nukemods.com\" target=\"_blank\"><img src=\"themes/iCGstation/forums/images/bt_left.gif\" border=\"0\" /></a></td>"
  . "			<td width=\"100%\" class=\"indexbom\" align=\"center\">";
  
$footer_message = footmsg();
  
echo "			</td>"
  . "			<td><a href=\"http://www.ioptional.com\" target=\"_blank\"><img src=\"themes/iCGstation/forums/images/bt_right.gif\" border=\"0\" /></a></td>"
  . "		  </tr>"
  . "		</table>"
  . "	</td>"
  . "	<td width=\"10\" nowrap=\"nowrap\" class=\"righttd\"></td>"
  . "  </tr>"
  . "</table>"
."";

}
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath;
    if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
$notes = "";
    }
    if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
    } else {
if($informant != "") {
    $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
    $content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $posted = ""._POSTEDBY." ";
    $posted .= get_author($aid);
    $posted .= " "._ON." $time ($counter "._READS.")";
    $tmpl_file = "themes/iCGstation/story_home.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
    $posted = ""._POSTEDON." $datetime "._BY." ";
    $posted .= get_author($aid);
    if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
$notes = "";
    }
    if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
    } else {
if($informant != "") {
    $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
    $content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $tmpl_file = "themes/iCGstation/story_page.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}
function themesidebox($title, $content) {
    $tmpl_file = "themes/iCGstation/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}
?>

 

 

 

Link to comment
Share on other sites

you can have a BOM inserted automaticaly on some OS's

 

where it says

 

<?php **HERE**

$bgcolor1 = "#EAEAEA";

 

so u need to backspace

 

<?php$bgcolor1 = "#EAEAEA";

 

then a str8 return

 

 

<?php

$bgcolor1 = "#EAEAEA";

 

 

if none of this works, just put ob_start(); at the very begining of teh file after <?php

 

Link to comment
Share on other sites

problem fixed.

there was an option in the confrig file to turn warnings off and on, and i had it on, so i turned it off and bingo it works

 

hey you could have done that yourself just for that page and that is the error you need to find it and fix it, dont think we were wrong and ur right, cos the error is there you just stopped displaying it, one day it will just stop working

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.