# PHP 5.2.0: "Hooks for tracking file upload progress were introduced."

- Thread: https://externals.io/message/26705
- Original archive: https://news-web.php.net/php.internals/26705
- Started by Stickman on 2006-11-23T10:04:36+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

---

## #26705 — Stickman — 2006-11-23T10:04:36+00:00

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

Hi

I originally posted this to the general list but received no response,
so I thought I might have more luck here. Apologies in advance if this
is not the appropriate place for this question.

The PHP 5.2.0 release announcement
(http://www.php.net/releases/5_2_0.php) mentions, "Hooks for tracking 
file upload progress were introduced" but no further info on how these
'hooks' can be used. I even checked through the results of
 `get_defined_functions()` and I could find no sign of anything that fit
the bill.

Any pointers would be appreciated.

Cheers,

Stickman

---

## #26706 — Rasmus Lerdorf — 2006-11-23T10:31:23+00:00

URL: https://externals.io/message/26705#26706 · In reply to: #26705

They are C-level hooks.  The various storage mechanisms need to add
support for them in order to expose them to userspace PHP.  I added
support in pecl/apc, for example.

See:

 http://progphp.com/progress.php
 (pick some random file in the 200k size range)

Source at:  http://progphp.com/progress.phps

Eventually we will see more extensions that manage server-side storage
with support for the hooks.

-Rasmus

Stickman wrote:
> Hi
> 
> I originally posted this to the general list but received no response,
> so I thought I might have more luck here. Apologies in advance if this
> is not the appropriate place for this question.
> 
> The PHP 5.2.0 release announcement
> (http://www.php.net/releases/5_2_0.php) mentions, "Hooks for tracking 
> file upload progress were introduced" but no further info on how these
> 'hooks' can be used. I even checked through the results of
> `get_defined_functions()` and I could find no sign of anything that fit
> the bill.
> 
> Any pointers would be appreciated.
> 
> Cheers,
> 
> Stickman

---

## #26707 — Stickman — 2006-11-23T10:45:10+00:00

URL: https://externals.io/message/26705#26707 · In reply to: #26706

Thanks for the reply.

After submitting the question I came across this page
http://blog.bitflux.ch/archive/2006/09/28/ (linked from the PHP docs of
course -- must update my local help file!) with an early patch that
makes use of these new hooks. However, I suspect we'll wait until
something more 'official' comes along (we don't currently use APC,
although I'm working on changing that).

Thanks again for your help.

Stickman
> They are C-level hooks.  The various storage mechanisms need to add
> support for them in order to expose them to userspace PHP.  I added
> support in pecl/apc, for example.
>
> See:
>
>  http://progphp.com/progress.php
>  (pick some random file in the 200k size range)
>
> Source at:  http://progphp.com/progress.phps
>
> Eventually we will see more extensions that manage server-side storage
> with support for the hooks.
>
> -Rasmus
>
> Stickman wrote:
>   
> > […]
