Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > Upload progress
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th August 04:01
iamstever@gmail.com
External User
 
Posts: 1
Default Upload progress



We do a "web 2.0" type upload, and show a spinner. When the file is
large or the connection slow, people sometimes abort thinking that
there was a problem. I'd like to show a progress bar. Is this possible
yet? Which version? I can't use perl on these servers (PHP only), so
I'm SOL. I've used a patch before, but a client does not want to use a
hacked up PHP on production servers.

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


  sponsored links


2 25th August 04:01
evert@filemobile.com (evert
External User
 
Posts: 1
Default Upload progress



Easiest way to go would then be flash or a java applet.. all the other
methods i can think of are either php extensions or perl..


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
  Reply With Quote
3 25th August 04:01
shiznatz@gmail.com (robert
External User
 
Posts: 1
Default Upload progress


------=_Part_26321_30880222.1155092164096
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Or a lovely javascript concoction

-bok


--
Xnyo - http://xnyo.odynia.org/

------=_Part_26321_30880222.1155092164096--
  Reply With Quote
4 25th August 07:45
unknown@simplemachines.org (unknown w.
External User
 
Posts: 1
Default Upload progress


How is that? You can't get any feedback from PHP (except, now, by
installing/writing an extension) about how far along the upload is - no
matter how much JavaScript you use. And the browser won't tell you.

Some people have scanned the /tmp directory for possible PHP uploads,
but this obviously doesn't work even a bit for concurrent users.

-[Unknown]

-------- Original Message --------

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
  Reply With Quote
5 25th August 07:45
rasmus@lerdorf.com (rasmus
External User
 
Posts: 1
Default Upload progress


The patch to support this is in PHP 5.2 CVS now.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
  Reply With Quote
6 25th August 07:45
arpad@rajeczy.com (arpad
External User
 
Posts: 1
Default Upload progress


If you set post_max_size to 0, you can parse the post data yourself from
php://input. Combine that with the Content-Length value from
apache_request_headers() and you have everything you need for a progress
monitor.

I don't mean to detract from the hopefully soon-to-come support in the
core, just to point out that it's already possible without a patch.

I have some code using this method in case anyone's interested, email me
off-list.

Arpad


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
  Reply With Quote
7 25th August 08:41
wrowe@rowe-clan.net (william a. rowe,
External User
 
Posts: 1
Default Upload progress


Of course - this is entirely irrelevant if the client uses
Transfer-Encoding: chunked, in which case you better ignore Content-Length
if the client (or middle proxies) provided one. And if you don't grok this,
you'd better search for the Watchfire Report on HTTP Request / Response
Spoofing vulnerabilities before creating yet another vulnerable server app.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
  Reply With Quote
8 25th August 09:30
unknown@simplemachines.org (unknown w.
External User
 
Posts: 1
Default Upload progress


I had thought that was only for extensions; is there something in the
userspace too (without writing/installing an extension)?

Thanks,
-[Unknown]

-------- Original Message --------

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
  Reply With Quote
9 25th August 09:31
unknown@simplemachines.org (unknown w.
External User
 
Posts: 1
Default Upload progress


Fair enough. I was under the (now obviously wrong) impression that
setting post_max_size to 0 wouldn't let me get to the post data.

But that's still setting you dependent on it being Apache. I would need
(if I were to add this feature to any of my software) to write this in
code that can run on IIS or as CGI (because it is intended for end-users.)

Very interesting.

Thank you,
-[Unknown]

-------- Original Message --------


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
  Reply With Quote
10 25th August 14:55
arpad@rajeczy.com (arpad
External User
 
Posts: 1
Default Upload progress


Of course then $_POST isn't available, so if you want to handle normal
POST data in the same request it also has to be manually parsed. I use
an .htaccess file to limit this to the one file handling these requests.

I believe you could use $_SERVER/$_ENV['CONTENT_LENGTH'] in CGI, I don't
know about the IIS ISAPI module though.

Arpad

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


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666