Welcome Guest, Not a member yet? Register   Sign In
Session issues
#1

[eluser]gRoberts[/eluser]
hey all,

I am struggling to find a way around a session issue I have.

I am storing a guid in a session via set_userdata and on the next page trying to clear it.

When I try calling sess_destroy or set the value to null via set_userdata I get the following error:

Code:
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at public_html/items/system/application/libraries/Smarty/Cache/%Ï^CF0^CF0B35EB%&#xma;in_header.tpl.php:9)

Filename: libraries/Session.php

Line Number: 282

FYI I am using Smarty.

I only usually see this error when I try doing a header redirect and echo at the same time.

Any idea's?
#2

[eluser]gtech[/eluser]
spaces outside the <?php ?> tags somewhere in the code path will do it.


[url="http://ellislab.com/forums/viewthread/66265/"]see : kick the <?php ?> habit![/url]

I don't know about smarty though.. sounds nasty Smile
#3

[eluser]gtech[/eluser]
[url="http://ellislab.com/forums/viewthread/62414/"]link to smarty headers issue post[/url] hope it helps
#4

[eluser]gRoberts[/eluser]
thanks gtech

as much as I'd like to say that was the issue, its not Sad

Plus that'd only be the case if you were redirecting would it not? I'm only setting or destroying session data.

It's been fine until now.
#5

[eluser]codelearn[/eluser]
This may be a shot in the dark, but are you using Output buffering (set in php.ini). I'm not positive, but I think that will allow you to echo even after headers are sent.
#6

[eluser]gRoberts[/eluser]
I ended up changing the way it worked. Instead I changed it all so that it used Post.




Theme © iAndrew 2016 - Forum software by © MyBB