Developers,

You may remember me posting regarding this issue in the past.  I also
wrote a patch to accomplish this task that I've been maintaining for my
company and updating with the 4.3.x releases.  I'm very glad to see
discussion regarding this issue once again.  I have gotten many, many
requests by individuals who really needed this functionality.

Here is a link to my patch for 4.3.8:

http://david.enderson.net/downloads/php-4.3.8-file_upload_status.tar.gz

And here is a link to the demo page on my server.  This page runs the
example code I include with my patch:

http://david.enderson.net/file_upload_status/file_upload_form.html

As someone mentioned, hooks into the receiving engine are necessary that
can be accessed by an external script.  In my case, since I didn't
understand shared memory very well, I use temporary files on the hard
drive that store the current status and bytes.  Those files are the used
to transfer the information between the language code handling the
incoming data and the script getting the status.  My extension functions
access the file to get the current status.

If you look at my example code, it is pretty easy to use because there
are just a handful of functions that the user uses to get the status.

This is thread safe because the file system and the unique ID take care
of any possible collisions.

I understand that any file upload status upgrade would occur in HEAD and
PECL, I just wanted to explain the problem more thoroughly to those who
haven't studied the problem in detail, and show a good example of how
the upload status could be accessed in the status script.

--David

-----=+=-----
David Enderson
Programmer
Digital IMS

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to