Connecting Tech Pros Worldwide Help | Site Map

session issues

  #1  
Old January 27th, 2006, 09:15 PM
camou
Guest
 
Posts: n/a
I cannot under this error message and how I may resolve it. Any help
appreciated. It appears when I combine Smarty with session_start

Warning: Cannot modify header information - headers already sent by
(output started at /home/ ...
  #2  
Old January 27th, 2006, 09:45 PM
Jonathan
Guest
 
Posts: n/a

re: session issues


camou wrote:[color=blue]
> I cannot under this error message and how I may resolve it. Any help
> appreciated. It appears when I combine Smarty with session_start
>
> Warning: Cannot modify header information - headers already sent by
> (output started at /home/ ...[/color]

It means that data (page output) was already sent to the c;ient browser
before the session_start command is given.

Ths ession_start command should appear before any output is done,
usually at the top of the script.

Jonathan
  #3  
Old January 28th, 2006, 01:35 AM
Carl Vondrick
Guest
 
Posts: n/a

re: session issues


Jonathan wrote:[color=blue]
> It means that data (page output) was already sent to the c;ient browser
> before the session_start command is given.[/color]

Not exactly. It means that the session_start() call was sent after
output (as you said) and in the php.ini file, session.use_only_cookies
is set to true.

So, the solution: move the session_start() call to the top (recommended)
or change session.use_only_cookies to be 0.

  #4  
Old January 28th, 2006, 03:35 AM
s a n j a y
Guest
 
Posts: n/a

re: session issues


camou wrote:[color=blue]
> I cannot under this error message and how I may resolve it. Any help
> appreciated. It appears when I combine Smarty with session_start
>
> Warning: Cannot modify header information - headers already sent by
> (output started at /home/ ...[/color]


Well this actually means that the some sort of data is already sent to
the client browser before session_start has been called. So you can do
one thing, make sure you do not have any print, echo statements before
session_start. It can not be even a blank html line.

hope this helps.

Sanjay
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
session issues lyealain answers 5 June 27th, 2007 05:29 PM
Access Value of a control on another page RSH answers 2 April 11th, 2007 05:15 PM
Concurrent session issues. Currently our website can have only one window open. Help me solve this. cendrizzi answers 9 December 3rd, 2006 10:15 AM
Session issues on multi processor machine Shiv Kumar answers 20 November 18th, 2005 03:09 AM
Session issues Josh Santangelo answers 0 July 17th, 2005 03:13 AM