> -----Original Message-----
> From: Peter Ford [mailto:p...@justcroft.com]
> Sent: 20 November 2009 15:18
> To: php-general@lists.php.net
> Subject: [PHP] Does PHP block requests?
> 
> I have a tricky problem.
> 
> I'm trying to make a progress feedback mechanism to keep users
> informed about a
> slowish process on the server end of a web app. The backend is
> generating a PDF
> file from a bunch of data which extends to many pages. I can keep
> tabs on the
> progress of this generation by working out how many lines of data is
> present,
> and how much of it has been processed. I use that information to set
> a session
> variable with a unique name - so for each step I set
> 
> $_SESSION['some-unique-
> name']=>Array('total'=>$totalLines,'count'=>$linesProcessedSoFar);

The progress-counter Ajax script uses a session -- but does the PDF generator 
use the same session? If so, I'm guessing you don't manually close the session 
at any point and all the progress-checking calls are blocked until the session 
auto-commits at the end of the generator script. To counter this, you need to 
manually session_commit() somewhere near the beginning of the generator script.

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.f...@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

Reply via email to