Jump to content

[SOLVED] sessions error


dotti

Recommended Posts

I get the error

It starts when i include user/main.php from the base DIR

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\header.php:14) in C:\xampp\htdocs\user\main.php on line 3

 

this is user/main.php

<?php

/* Include Files *********************/

session_start();

include("database.php");

include("login.php");

/*************************************/

displayLogin();

?>

Link to comment
https://forums.phpfreaks.com/topic/53483-solved-sessions-error/
Share on other sites

<html>
<head>

<title>Dotti CMS - Dotti</title>
</head>
<body>
<table border="0" width="100%" height="175" cellspacing="0" cellpadding="0" bgcolor="#0099ff">
<tr>
	<td>
	<p align="center"><img border="0" src="images/logo.bmp" width="575" height="175"></td>
</tr>
<tr height="10" bgcolor="#0066ff">
	<td>
	<?php include("time.php") ;?></td>
</tr>
</table>

Link to comment
https://forums.phpfreaks.com/topic/53483-solved-sessions-error/#findComment-264361
Share on other sites

ok theirs the problem

 

add

 

<?php
session_start();
?>

to the top of header.php (i assume thats going to be used everywhere)

 

so

<?php
session_start();
?>
<html>
<head>
<title>Dotti CMS - Dotti</title>
</head>
<body>

 

 

 

you can probably change

this is user/main.php
<?php
/* Include Files *********************/
//session_start(); //<---commented out
include("database.php");
include("login.php");
/*************************************/
displayLogin();
?>

 

basically you can't output to the page before using session_start

Link to comment
https://forums.phpfreaks.com/topic/53483-solved-sessions-error/#findComment-264365
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.