Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13725 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47178 invoked by uid 1010); 5 Nov 2004 09:49:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 47131 invoked from network); 5 Nov 2004 09:49:06 -0000 Received: from unknown (HELO jan.prima.de) (83.97.50.139) by pb1.pair.com with SMTP; 5 Nov 2004 09:49:06 -0000 Received: from BAUMBART (p508EBF63.dip.t-dialin.net [::ffff:80.142.191.99]) (IDENT: HydraIRC, AUTH: LOGIN tobi) by jan.prima.de with esmtp; Fri, 05 Nov 2004 09:47:33 +0000 Date: Fri, 5 Nov 2004 10:49:00 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <255444644.20041105104900@marcus-boerger.de> To: Klaus Reimer CC: internals@lists.php.net In-Reply-To: <418B4909.7010203@ailis.de> References: <418B4909.7010203@ailis.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Upload Progress Meter Patch From: helly@php.net (Marcus Boerger) Hello Klaus, we've haered of it in the past but it was too late to add for 4.3 series and obviously nobody cared to look for it for 5.0. So no the next version we could add it to would be 5.1. In general the idea is nice but it should also allow for script callbacks: function upload_callback() { // some SQL or SESSION functions... } register_upload_callback('upload_callback'); // upload code Shouldn't that work too? Apart from that the callback type and the c-level register functions must be declared in the corresponding .h file of course. And last but not least we cannot add this code because it is not thread safe, meaning the callback pointer must not be a static pointer but a global module variable instead especially the info for the script callbacks i asked for. regards marcus Friday, November 5, 2004, 10:34:01 AM, you wrote: > Hello, > The website "http://pdoru.from.ro/" states that "hopefully the patch > will be integrated into PHP". This patch adds some hooks to > main/rfc1867.c so PHP modules can implement stuff like reading the > current state of a file upload. Such an external PHP module can write > the state to disk or shared memory or whatever. A HTML popup shown to > the uploader can then view this data as a progress meter bar to the user > while he uploads large files. > This patch is extremely useful and is working very well. I'm already > using it (together with a self-written PHP module) quite successfully in > some projects where users can upload large image files. > What is the state of considering the integration of this patch into PHP? > Or is the statement on the webpage wrong and you have never heard of it? > I have attached a version of the patch for PHP 5.0.2. Even it you don't > like the way it is written it can still be used as an example to show > how it could be done. -- Best regards, Marcus mailto:helly@php.net