Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I need to close session before long-runing operation, because unclosed session blocks other processes.
$session->start(); //working with session.. $session->close(); //long-running operation $session->start(); //working with session.. $session->close();
It returns "headers already sent..". Cookie should not be sends again, if I call start() more times, or not?
Nette\Http\Session is a singleton wrapper for PHP bugs, quirks and insecurities.
Ad-hoc fix: Don't send output to user before starting session for second time.
Solution: Create basket for data, store it in different storage (ie.: database) and its id in session. Flush headers immediately. Work... Then update basket and store it again.