Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Using sessions in smarty

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
guitar_cam
Smarty n00b


Joined: 25 Sep 2003
Posts: 1

PostPosted: Thu Sep 25, 2003 11:43 am    Post subject: Using sessions in smarty Reply with quote

Hi all, i'm relatively new to the smarty system, so forgive
me if this question is one asked frequently (although I
couldn't find a solution on the forum :/ )

Basically I have a file index.php created by smarty
composing five .tpl files; header, footer, leftnav,
rightnav and main. The first one included is header.tpl.

My problem is that i'm wanting to use the php function
session_start(); as part of a small user signup&login
script i've written, however no matter where I place
the {include_php file="/login.php"} statement I always
get the same error, namely:

Quote:
Warning: Cannot send session cookie - headers already sent by (output started at \templates_c\%%-13\%%-135052920\header.tpl.php:5) in \sessionstart.php on line 2

Warning: Cannot send session cache limiter - headers already sent (output started at \templates_c\%%-13\%%-135052920\header.tpl.php:5) in \sessionstart.php on line 2


This occurs even if the call to the PHP file containing the
session_start() is the first thing in header.tpl

Any help or suggestions as to how I can achieve what i'm
trying to do would be very welcome!

Thanks,
Cam
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP