Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support PHP warning
George
Posted on 20 Aug 2010, 21:44:16

Access: Member
Total Posts: 3
Joined: 2010-08-20

I followed your directions on how to integrate this script.
Here is what I have below.
Code:
<?php 
$author
[] = 'George';
$template = 'News';
$cat[] = 'News';
$nppage = '10'; 
include 
'data/index.php';
?> 


How ever my error log gets filled with the following warning.

Code:
[20-Aug-2010 15:18:21] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/user/public_html/site.org/inc/header.inc.php:12) in /home/user/public_html/site.org/data/index.php on line 23

It is not that big of a deal but since I custom code 90% of the stuff on my website I like to keep my error log clear. This way I can track my own problems with code.

I can tell you that I do not add any headers for any other script on the page.
#2787
George
Posted on 22 Aug 2010, 20:05:35

Access: Member
Total Posts: 3
Joined: 2010-08-20

Any help would be great.
#2791
Chris
Posted on 25 Aug 2010, 17:31:35

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

This is strange as the error message shouldn't be happening. The line where it says there is an error is here

Code:
ob_start();
session_name('n13news');
if(!isset($_SESSION)){
    session_start();
}
ob_end_clean();


Which shouldn't be throwing an error as if it detects the session has already been set then it should skip starting a new session.

On line 12 in this file /home/user/public_html/site.org/inc/header.inc.php

Are you doing another session_start() here?
#2799
George
Posted on 25 Aug 2010, 19:24:14

Access: Member
Total Posts: 3
Joined: 2010-08-20

Nope All I have is some HTML and your include code as I pasted above.

I do have a few includes as that is how I break my website up into templates.

I do believe it is because it is not at the top of my first php file.


I temporarily fixed it by taking that from your index.php file and put it in my header.
#2805
Last edited by George at 2010-08-25 19:37:46 Reason:
Network-13.com © 2013