Re: APC - Upload progress problem. apc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrea:

I have in my php.ini:

apc.rfc1867 = On
apc.rfc1867_freq = 10K

The apc.php diagnostic/report page says it is on. It just returns false. I will look at your zip file and see if something jumps out.

Thanks, Phred

On Sep 14, 2009, at 4:04 PM, Andrea Giammarchi wrote:

Can you write here how you configured APC?
In my old test I had to set
apc.rfc1867 = On

and if you grab the zip: http://www.3site.eu/examples/APCQuery.zip
tell me what is exactly wrong (I tried ages ago though, I am using other strategies right now:http://code.google.com/p/noswfupload/ - not suitable for 1Gb of files though)

About trying to grab info via PHP ... there is a little problem, that page will be executed only after the file has been sent, so obviously you'll never be able to know size, error, tmp_name, before the file has benn fully stored in the tmp or specific folder, got the problem?

Regards

> CC: fsb@xxxxxxxxxx; php-general@xxxxxxxxxxxxx
> From: phplist@xxxxxxxxxxxxxxx
> To: an_red@xxxxxxxxxxx
> Subject: Re:  APC - Upload progress problem. apc
> Date: Mon, 14 Sep 2009 15:21:40 -0500
>
> Andrea:
>
> I see. That is a cool idea, but you are right, concurrency could
> definitely be a problem. That's what APC is supposed to solve because
> it tags the file with a unique ID. But I can't get that sucker to
> return the value to me! If I could get APC to work I would be done.
>
> I also started looking at trying to grab the temp file, ".
> $_FILES['video_file']['tmp_name'], and then keep checking its size on
> the server, but I don't think I can get the temp name from php until
> it is uploaded. Do you know if that is possible?
>
> One other thing, I looked at a canned media management web app ($875
> US) that will do this uploading, and it doesn't require APC, so there
> definitely is some way to do this with basic PHP.
>
> Thanks, Phred
>
>
>
> On Sep 14, 2009, at 1:55 PM, Andrea Giammarchi wrote:
>
> >
> > The concept of my last link is this:
> > the instant before you do the upload you ask PHP to scan the tmp
> > folder, or the folder used to upload files (often the tmp) and you
> > snap number of files, then the upload starts, and it will create a
> > temp file with a PHP predefined prefix, you array_diff the snap with > > the current file list and you get the file that the user is uploading.
> >
> > At that point if you are lucky the input="file" field will give you > > access to its fileSize, and you have everything to create a progress
> > bar: the polled incremental tmp file size in the server, plus the
> > total in the client, a bit of transitions/effects and that's it.
> >
> > This method is not ideal, generally speaking, because it could
> > easily suffer concurrency between multiple users.
> >
> > I did not know Flash player had to put the entire file in memory, it > > sounds truly silly for scalability reasons, are you absolutely sure
> > about this?
> >
> > About APC you need to enable it and so far I had no problems with
> > files up to 350 Mb , I wonder why 1Gb should be a problem.
> >
> > Regards
> >
> >> CC: php-general@xxxxxxxxxxxxx
> >> From: phplist@xxxxxxxxxxxxxxx
> >> To: fsb@xxxxxxxxxx
> >> Date: Mon, 14 Sep 2009 13:16:13 -0500
> >> Subject: Re:  APC - Upload progress problem. apc
> >>
> >>
> >> On Sep 14, 2009, at 9:15 AM, Tom Worster wrote:
> >>
> >>>
> >>> with files that big, perhaps could write client js that polls a
> >>> script on
> >>> the server that simply returns the file size(s)? if you want a
> >>> thermometer,
> >>> use the number to resize a colored div.
> >>>
> >>>
> >> Thanks Tom, for weighing in.
> >>
> >> Having js poll a script on the server is kind of what APC was about, > >> and perl as well. Are you saying I could use PHP on the server side
> >> to
> >> do this? It seems almost obvious, but no one mentions it any where on > >> the web, so a expected there was some fundamental limitation without
> >> APC.
> >>
> >> Do you have any idea what this script might look like? Is it possible > >> to get the temp file name before the upload is completed so that its
> >> size can be monitored?
> >>
> >> If it is, it is just too dang simple! ...but I'd take it for sure.
> >>
> >> Thanks, Phred
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >
> > _________________________________________________________________
> > More than messages–check out the rest of the Windows Live™.
> > http://www.microsoft.com/windows/windowslive/
>

check out the rest of the Windows Live™. More than mail–Windows Live™ goes way beyond your inbox. More than messages


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux