session error

kundamor

Member
Messages
36
Reaction score
0
Points
6
how can i handle following error where on the other page same code works well...

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/kundamor/public_html/---/---/--add.php:3) in /home/kundamor/public_html/folder/adminfold/file_add.php on line 4
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
how can i handle following error where on the other page same code works well...

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/kundamor/public_html/---/---/--add.php:3) in /home/kundamor/public_html/folder/adminfold/file_add.php on line 4

Whats everything in the script up to and including line 4?

One of them is sending some form of output to the browser, and session_start has to be above whatever that is.


Edit: Forgot to mention to block out anything that's personal/passwords in those 4 lines, but it seems you already kinda figured that (the path to the add.php file's obscured :) )
 
Last edited:

quantum1

New Member
Messages
68
Reaction score
0
Points
0
as Livewire said, if you have a space or any other characters before the <?php tag then those characters go out to the browser; if you later have session_start() in your php you will get the error you are seeing
 

tttony

Member
Messages
147
Reaction score
0
Points
16
try this...

with this message here show that message because there is output string before session_start()
<?php
session_start()
?>
 
Top