472,952 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Can someone explain this error to me? :(

Hi!
I can`t understand what php wants from me:( So:
Cannot send session cache limiter - headers already sent (output started at
/home/krecik/public_html/silnik.php:208) in /home/krecik/public_html/silnik.php on
line 251

Line 208: print ( "error: " . mysql_error());
Line 251: session_register("uprawnienia", "zalogowany");

I can understand that sth, is wrong in line 251 after line 208 and it is logical to
me, but I have no idea what possibly could be wrong with line 208.
Yes I know that that it`s better to store session information on server. I already
asked admin to change variable in php.ini.

--
Best regards,
Maciej Nadolski
Jul 17 '05 #1
11 3101
"Maciej Nadolski" <us****@WYTNIJ-TO.nadolski.net> wrote in message
news:Xn*******************************@193.110.122 .80...
Hi!
I can`t understand what php wants from me:( So:
Cannot send session cache limiter - headers already sent (output started at /home/krecik/public_html/silnik.php:208) in /home/krecik/public_html/silnik.php on line 251

Line 208: print ( "error: " . mysql_error());
Line 251: session_register("uprawnienia", "zalogowany");

I can understand that sth, is wrong in line 251 after line 208 and it is logical to me, but I have no idea what possibly could be wrong with line 208.
Yes I know that that it`s better to store session information on server. I already asked admin to change variable in php.ini.


Was your session started at the beginning of the script?

- Virgil
Jul 17 '05 #2
"Virgil Green" <vj*@obsydian.com> wrote in
news:UB*********************@newssvr30.news.prodig y.com:

Was your session started at the beginning of the script?

Nope.
I only set this:
session_cache_expire(3600);
I`m not sure is it setting of a session...

--
Best regards,
Maciej Nadolski
Jul 17 '05 #3
"Maciej Nadolski" <us****@WYTNIJ-TO.nadolski.net> wrote in message
news:Xn*******************************@193.110.122 .80...
Hi!
I can`t understand what php wants from me:( So:
Cannot send session cache limiter - headers already sent (output started at /home/krecik/public_html/silnik.php:208) in /home/krecik/public_html/silnik.php on line 251

Line 208: print ( "error: " . mysql_error());
Line 251: session_register("uprawnienia", "zalogowany");

I can understand that sth, is wrong in line 251 after line 208 and it is logical to me, but I have no idea what possibly could be wrong with line 208.
Yes I know that that it`s better to store session information on server. I already asked admin to change variable in php.ini.

--
Best regards,
Maciej Nadolski

all session stuff, like registering variables, has do be done befor you
"print" any html code, because then the train has gone ;)
Jul 17 '05 #4
"Jrrn-Inge Kristiansen" <jo******@stud.ntnu.no> wrote in
news:bl*********@tyfon.itea.ntnu.no:
all session stuff, like registering variables, has do be done befor
you "print" any html code, because then the train has gone ;)

Thanks.

--
Best regards,
Maciej Nadolski
Jul 17 '05 #5
"Jrrn-Inge Kristiansen" <jo******@stud.ntnu.no> wrote in
news:bl*********@tyfon.itea.ntnu.no:

all session stuff, like registering variables, has do be done befor
you "print" any html code, because then the train has gone ;)


Now session is started BEFORE user log himself in.
I eliminated print which in fact there was telling which rights ypu have.
And I still have something like that:
Warning: session_register(): Cannot send session cache limiter - headers already
sent (output started at /home/krecik/public_html/funkcje.php:212) in
/home/krecik/public_html/funkcje.php on line 239
Any more ideas?

--
Best regards,
Maciej Nadolski
Jul 17 '05 #6
Maciej Nadolski <us****@WYTNIJ-TO.nadolski.net> schrieb:
I eliminated print which in fact there was telling which rights ypu have.
And I still have something like that:
Warning: session_register(): Cannot send session cache limiter - headers already
sent (output started at /home/krecik/public_html/funkcje.php:212) in
/home/krecik/public_html/funkcje.php on line 239
Any more ideas?


Yes. You have an ouptput in line 212 of the file
/home/krecik/public_html/funkcje.php

Regards,
Matthias
Jul 17 '05 #7
Matthias Esken <mu******************@usenetverwaltung.org> wrote in
news:bl**********@usenet.esken.de:
Yes. You have an ouptput in line 212 of the file
/home/krecik/public_html/funkcje.php


Thanks.

line 212 looks like this:
print ( "error: " . mysql_error());
I still van`t ungerstand what outout then means:( Could someone explain THIS to
me? :) TIA

--
Best regards,
Maciej Nadolski
Jul 17 '05 #8
Maciej Nadolski wrote:
Yes. You have an ouptput in line 212 of the file
/home/krecik/public_html/funkcje.php
line 212 looks like this:
print ( "error: " . mysql_error());
I still van`t ungerstand what outout then means:( Could someone explain
THIS to me? :) TIA


You have a function which is called prior to session_start(), like this:

<?php
someMySQLFunction();
// foo...
session_start(); // or other session_* function
?>

If there is an error while talking with MySQL server, your function will
issue an error and you cannot send headers after that. Reverse the function
calls.

--
Dado

Expect the worst, it's the least you can do.
Jul 17 '05 #9
Maciej Nadolski <us****@WYTNIJ-TO.nadolski.net> schrieb:
Matthias Esken <mu******************@usenetverwaltung.org> wrote in
news:bl**********@usenet.esken.de:
Yes. You have an ouptput in line 212 of the file
/home/krecik/public_html/funkcje.php


line 212 looks like this:
print ( "error: " . mysql_error());
I still van`t ungerstand what outout then means:( Could someone explain THIS to
me? :) TIA


You're nort allowed to have _any_ output before you use the header()
function. print, echo or print_r will generate an output.

Regards,
Matthias
Jul 17 '05 #10
Maciej Nadolski wrote:
[...]
I still van`t ungerstand what outout then means:( Could someone explain THIS to
me? :) TIA


--------
<?php
echo '<html>';
session_start(); ### error: html was echo'd before the needed
### session_start() call
?>
========
or
--------
<html>
<head>
<title>test</title>
</head>
<body>
<?php
session_start(); ### error: the first output was "<html>"
?>
</body>
</html>
========
or
--------
<?php
include 'standard.inc.php';
session_start(); ### error if standard.inc.php outputs anything
### other than other headers
?>
<head><head><title>!!!</title></head><body><p>!!!</p></body></html>
========

HTH
--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.
Jul 17 '05 #11
Pedro <he****@hotpop.com> wrote in
news:bm************@ID-203069.news.uni-berlin.de:
--------
<?php
echo '<html>';
session_start(); ### error: html was echo'd before the needed
### session_start() call
?>


Thanks!
Now I understand it. Print displaying the error message from mysql and it was the
problem. Thanks again for patience.

--
Best regards,
Maciej Nadolski
Jul 17 '05 #12

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

Similar topics

14
by: Ina Schmitz | last post by:
Hello all, I don't succeed in displaying the explain plan. I use IBM DB2 Universal Database 8.2. I tried to do the example given in the online help for "Visual Explain". The tables...
10
by: Jeff Boes | last post by:
I'm hoping there's someone here with experience in building the Visual Explain tool from Red Hat. I downloaded it and the J2 SDK, but when I attempt to follow the build instructions, I get messages...
1
by: Simon Windsor | last post by:
Hi I have just recevived this error could not write to hash-join temporary file: No space left on device Can someone please explain how I can stop this occuring. Whereis the hash-join...
4
by: marklawford | last post by:
Not having earned my DBA badge from the scouts just yet I'm a little lost with an error I'm getting. We've just upgraded our development database from 7.2 to 8.2 as the first step in upgrading...
6
by: sparks | last post by:
extracalc = Switch(Me.Parent.Race_Black = -1 And Me.Parent.Sex = "Female", 1.952, Me.Parent.Race_Black = -1, 1.21, Me.Parent.Sex = "Female", 0.742, 1) I look at this and say ok if race = black...
3
by: chucher | last post by:
I´m developing a database in access about invoices that could use to different kinds of money (US Dollar and Pesos). I have a form where you can insert the invoices and de items of de invoice. I...
4
by: Adrian | last post by:
can someone explain the cross domain security re AJAX in IE? I have a page that calls a web service (WS) from another domain (the target browser is only IE6) and displays it's results! all works...
8
by: Bart | last post by:
Could someone explain me what is wrong with this code ? I gives me a compile error: Error 1 Use of unassigned local variable 'fileStreamObject' C:\Documents and Settings\Bart\Local...
1
by: okonita | last post by:
I need major help resolving a UDF error. My environment id DB2 UDBv8.2 and v9.1 on a Linux and Windows server. I am getting a SQL20148N error which states as follows: SQL20148N Routine...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.