Prismatic Posted June 27, 2009 Share Posted June 27, 2009 Are sessions mutually independent in each process? If I spawn 50 processes, in each process I assign a session variable, $_SESSION['test'] a random value between 0, 100, will they all be different in each process? Link to comment https://forums.phpfreaks.com/topic/163842-pcntl_fork-question-about-sessions/ Share on other sites More sharing options...
trq Posted June 27, 2009 Share Posted June 27, 2009 The $_SESSION array relates to a request so no. Besides, you should not be using the pcntl functions within a webserver environment, it can be very problematic. Link to comment https://forums.phpfreaks.com/topic/163842-pcntl_fork-question-about-sessions/#findComment-864507 Share on other sites More sharing options...
Prismatic Posted June 27, 2009 Author Share Posted June 27, 2009 The $_SESSION array relates to a request so no. Besides, you should not be using the pcntl functions within a webserver environment, it can be very problematic. It's not for use by the public, it's for a tool I've created to parse large amounts of data. Link to comment https://forums.phpfreaks.com/topic/163842-pcntl_fork-question-about-sessions/#findComment-864627 Share on other sites More sharing options...
trq Posted June 27, 2009 Share Posted June 27, 2009 And? Are you planning on executing it via a web server? Link to comment https://forums.phpfreaks.com/topic/163842-pcntl_fork-question-about-sessions/#findComment-864631 Share on other sites More sharing options...
Prismatic Posted June 27, 2009 Author Share Posted June 27, 2009 And? Are you planning on executing it via a web server? it's my dedicated web server but the script doesn't run through a web browser if that's what you're asking. Link to comment https://forums.phpfreaks.com/topic/163842-pcntl_fork-question-about-sessions/#findComment-864740 Share on other sites More sharing options...
trq Posted June 27, 2009 Share Posted June 27, 2009 Well, if its running through the command line you can't use sessions. Link to comment https://forums.phpfreaks.com/topic/163842-pcntl_fork-question-about-sessions/#findComment-864861 Share on other sites More sharing options...
Prismatic Posted June 28, 2009 Author Share Posted June 28, 2009 Well, if its running through the command line you can't use sessions. I find that interesting because sessions are working. Link to comment https://forums.phpfreaks.com/topic/163842-pcntl_fork-question-about-sessions/#findComment-864929 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.