RE: [PHP] Does PHP block requests?
| From: | Ford, Mike | Date: | Fri, 20 Nov 2009 21:57:04 +0000 |
| Subject: | RE: [PHP] Does PHP block requests? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299994@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Peter Ford [mailto:pete@justcroft.com]
> Sent: 20 November 2009 16:40
> You're right about trying to use the same session - that was the
> plan to get the
> progress state passed across from one call to the other.
> Closing the session on the generator script has the effect of
> stopping any
> further changes to the session variable, so I get the initial value
> at each
> request after that.
Yes, that would be the expected effect of putting in a session_commit() at the beginning.
> Perhaps I can do it with some other message passing mechanism (e.g.
> a temporary
> file) instead of the $_SESSION.
Yes, that would be a way to go. Another alternative is to re-start the session each time you want to
write an updated value into it and then immediately close it again. The cost of opening and closing
a session to write a value into it compared to opening and closing a file to write a value into it
may be a factor here, but I leave that comparison as an exercise for the reader.
Others on the list may, of course, chip in with further options, or have other useful, or at least
witty, comments.
Cheers!
Mike
--
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,
Leeds Metropolitan University, C507, Civic Quarter Campus,
Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 812 4730
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm