Connecting Tech Pros Worldwide Help | Site Map

session issues

 
LinkBack Thread Tools Search this Thread
  #1  
Old January 27th, 2006, 08:15 PM
camou
Guest
 
Posts: n/a
Default session issues

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, 08:45 PM
Jonathan
Guest
 
Posts: n/a
Default 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, 12:35 AM
Carl Vondrick
Guest
 
Posts: n/a
Default 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, 02:35 AM
s a n j a y
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.