Totally Zenned
- Join Date:
- Oct 2006
- Posts:
- 5,422
- Plugin Contributions:
- 0
A pretty weird problem while accessing session outside of zen
I'm trying to access $_SESSION outside of zen, the purpose is to set a certain variable to see if js is enabled or not (the file is placed at zen root folder and called via ajax)
require('includes/application_top.php');
sleep(5);
$_SESSION['javascript_enabled'] = true;
exit();
You can notice I have to use sleep(5), otherwise the session is still set (when I print_r), but it's not stored at all (when you go to the next page)
I suspect we have a race condition here? It's weird since I thought php can not work that way.