# Making PHP upload hooks available through session variables?

- Thread: https://externals.io/message/39486
- Original archive: https://news-web.php.net/php.internals/39486
- Started by Tore B. Krudtaa on 2008-07-30T20:46:30+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #39486 — Tore B. Krudtaa — 2008-07-30T20:46:30+00:00

URL: https://externals.io/message/39486#39486

Hi.

I'm a web developer from Norway and new to this list.
I use PHP allmost daily producing web-apps for customers in Norway.

As most of you probably know Rasmus Lerdorf made som upload hooks available in PHP 5.2 some long time back.
This was great news for those that wanted more control of uploads and/or wanted to give "real time" feedback to client about upload progress, and had APC installed as well.

Most PHP installations does not have APC installed, so therefore the upload hooks are not available.

I would like to be able to use the upload hooks without installing the APC.

I would eventually like to be able to use those upload hooks using session variables.

Does anybody know if there is any work going on which will enable the use of those upload hooks from a PHP installation not using APC?

If no work is going on to enable usage of those upload hooks, is there anybody here that are interested in doing such work?

I'm not a C developer but I can eventually test and give feedback/suggestions.

I have filed a feature request for it here:
http://bugs.php.net/bug.php?id=39447&edit=2

But seems like nobody are interested/have time for the request.

Here is a link to upload hooks, how to (using APC):
http://talks.php.net/show/torkey06/23

If this is the wrong list to post this question then I would appreciate a message telling me which list to subscribe to.

Tore B. Krudtaa

---

## #39490 — johannes@php.net — 2008-07-31T01:01:16+00:00

URL: https://externals.io/message/39486#39490 · In reply to: #39486

Hi,


> As most of you probably know Rasmus Lerdorf made som upload hooks 
> available in PHP 5.2 some long time back.
> This was great news for those that wanted more control of uploads 
> and/or wanted to give "real time" feedback to client about upload 
> progress, and had APC installed as well.
> 
> Most PHP installations does not have APC installed, so therefore the 
> upload hooks are not available.
> 
> I would like to be able to use the upload hooks without installing 
> the APC.

There's also a package called uploadprogress or something like that in
PECL.

> I would eventually like to be able to use those upload hooks using 
> session variables.

I think that's not possible in a good way as the uploading process would
have to open and parse the session file, update the status, serialize it
and store it again to disk everytime the status changes (aka. every few
bytes received), APC does that using shared memory, uploadprogress using
special files in /tmp, I think.

johannes

---

## #39492 — D. Dante Lorenso — 2008-07-31T06:05:45+00:00

URL: https://externals.io/message/39486#39492 · In reply to: #39486

Tore B. Krudtaa wrote:
> I would like to be able to use the upload hooks without installing the APC.
> I would eventually like to be able to use those upload hooks using session variables.

Maybe you can avoid the problem entirely.  I was using the 
uploadprogress PECL extension (which I believe also leveraged the 5.2 
hooks) for a year or so until I found this upload progress meter written 
using Flash and Ajax:

   http://digitarald.de/project/fancyupload/

If you follow the mailing archives, there's been great debate whether a 
feature like upload progress monitoring belongs in PHP (server side) or 
in your browser (client side).  I like server-side control, but after 
experiencing the Fancy Upload 2 embedded into my current web project, I 
love it and have no reason to go back to the "old" PHP-way.

FU2 (not my acronym) does require Flash 9, but my site already makes 
this dependency.  If you can accept those reqs, FU2 also supports 
multiple file uploads and can give progress feedback for all files as a 
whole.

-- Dante
