473,402 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Problem - sessions

Hello

I have a problem with sessions - how to resolve this:

"Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at c:\usr\krasnal\www\an\edycja.php:8) in
c:\usr\krasnal\www\an\edycja.php on line 11"

Thx for all

TomeN
Jan 18 '06 #1
3 1234
>I have a problem with sessions - how to resolve this:

"Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at c:\usr\krasnal\www\an\edycja.php:8) in
Take the stuff on line 8 that generates output, and move it *AFTER* line
11. Even a blank line outside <?php ?> is a problem.

c:\usr\krasnal\www\an\edycja.php on line 11"


Gordon L. Burditt
Jan 18 '06 #2
Tomasz Nowak wrote:
I have a problem with sessions - how to resolve this:

"Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at c:\usr\krasnal\www\an\edycja.php:8) in
c:\usr\krasnal\www\an\edycja.php on line 11"


This message means that when php reached line 11 and tried the
session_start() you have there, it was unable to do so because output
had already started (by something you wrote on line 8) and headers
(which are needed for session management) *have*to*be* sent before
anything else.

So, do one of the following:

a) delete line 8;
b) move line 11 to somewhere before line 8;
c) try to code your site without sessions;

--
If you're posting through Google read <http://cfaj.freeshell.org/google>
Jan 18 '06 #3
On 2006-01-18, Tomasz Nowak <no****@op.pl> wrote:
"Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at c:\usr\krasnal\www\an\edycja.php:8) in
c:\usr\krasnal\www\an\edycja.php on line 11"


It's one of the most frequent problems and a little websearch for "headers
already sent" will return more than enough good solutions.

a-) As the error message suggests, make sure there is no output before you call
session_start or header. Usually, this happens because there is some whitespace
before the <? where the php code starts.

b-) Use outputbuffering. http://www.php.net/ob. Notice that this does not buffer
headers.
--
Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be>
Jan 19 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ben | last post by:
Hi, I am running a simple application dedicated to verify the sessions variables, but it is not working. both transid and trackvars are enabled. testpage1: <?php session_start();...
9
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
1
by: Vince | last post by:
I have several questions about queries I make into my database. I will explain you. Could you please help me? 1)In my people table, persons have a title (Mr, Miss, or whatever). " select...
6
by: Paul | last post by:
Hi all, I seem to been having a problem with sessions. I have a session in the login page Session("UserLevel") = (MM_rsUser.Fields.Item("Accesslevel").Value) which doesn't seem to be visible...
1
by: antao | last post by:
I'm keeping in the database a log of all the sessions for my application. I'm trying to write a stored procedure that returns all the sessions that; the login contains a certain string, loggedin...
17
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
1
by: fizbang | last post by:
This should be impossible, but for some reason, people are not getting individual sessions. They start a session. I set the session("application") variable to the unique number generated by an...
4
by: Ian Davies | last post by:
Hello I am struggling for a solution to clear some fields on my webpage that takes their values from some sessions My solution below works when the button is clicked twice. I sort of know why I...
3
by: stclaus | last post by:
Hi, I'm currently experiencing a problem using sessions under php 4.4.2. I store variables and objects inside session variables, and all works well under php 5.x, but when I upload those pages to...
8
by: geert | last post by:
Hi all, I have a mac mini running maocosx 10.5 leopard I want to deploy a django project on. My backend is MySQL, and I have it running as a 64- bit app. Of course, apache2 is also running as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.