Recent Topics

1 Apr 29, 2008 07:45    

My b2evolution Version: Not Entered

Hello my site that I am having an issue with is http://www.currentjam.com/betapage/Take2/main.php I have my stub file inside my php template and it will display the message of at the top of my pages:

Warning: Cannot modify header information - headers already sent by (output started at /home/sites/site21/web/betapage/Take2/main.php:6) in /home/sites/site21/web/blogs/inc/sessions/model/_session.class.php on line 219

When I go to /home/sites/site21/web/blogs/inc/sessions/model/_session.class.php line 219 I see the coding of

setcookie( $cookie_session, $this->ID.'_'.$this->key, time()+315360000, $cookie_path, $cookie_domain );

I commented the line out and updated the site and the message went away. When I try to login to backend though it will display the message:

Either you have not enabled cookies or this login window has expired.

I went back into my code, uncommented that line, updated the site and then login will work again but then I will get the message ontop of all my pages. I dont get it because my stub file is just fine but when I include it into a container in my page it displays the error.

I dont know what to do to get rid of the Warning: Cannot modify header information message.

Any sort of replies would be helpful. I just installed a fresh copy of 2.4.2 and I am using both IE7 and Firefox as my browsers.

2 Apr 29, 2008 08:16

You're looking in the wrong file ;)

(output started at /home/sites/site21/web/betapage/Take2/main.php:6)

¥

3 Apr 29, 2008 17:15

line 6 is my title

<title>Current Jam</title>

Is there any way I can get B2 to not sent out the title information?

4 Apr 29, 2008 17:23

hi jkvanbeck,

Check the same file and look for whitespace *before* the first <?php or *after* the closing ?>.
Remove that and your problem should be solved.

Good luck

5 Apr 29, 2008 17:26

here is how I call my stub file within my main.php file

<div id="content">
<p>&nbsp;</p>
<p><?php
$blog = 1;
$skin = 'BasicJAKE';
$show_statuses = array();
$blogroll_blog = 4;
$blogroll_cat = '';
$blogroll_catsel = array( );
$timestamp_min = '';
$timestamp_max = 'now';
include(dirname(__FILE__).'../../../blogs/blog1.php');
?></p>
</div>

the rest of my main.php file is html coding... what i pasted above is the only part where there is php coding.

6 Apr 30, 2008 00:41

b2evolution is made to make the entire page. Sticking it inside an existing page is asking for troubles like what you've got. I'm sure it can be done the way you are doing it but I've no idea how. Much easier, in my opinion, to simply let b2evolution make the page.

7 Apr 30, 2008 18:00

I have figured out that the reason why I am getting this error is because inside my HTML code where I have my php statement. The php statement is tring to set a cookie and you cannot set cookies inside of HTML code.

Is there anyway to disable cookies just for people who are viewing the site?


Form is loading...