Jump to content

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

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.