Sessions Errors when using regular PHP sessions

Notice: This thread is very old.
Member | 1

Im trying to implement a simple captcha on Nette version 9. where i using plain php sessions but i keep getting this error:

Warning: session_start() [function.session-start]: Cannot send session cookie – headers already sent by (output started at /temp/cache-Nette.Template%00b67c8f908d71b685776237e9d7436ebe.%40layout.phtml.php:15)

here is a link to the simple php capcha:…tcha-script/

The problem is i looked at the documentation and tried to use the as sessions as noted but it completely broke the view. not sure where to take it from there.

greatly appreciated.

Moderator | 1364

Nette has no version 9, current stable is 2.0.12.

You start sessions too late. You should start them sooner, before templates starts being rendered.