Re: APC - Upload progress problem. apc
| From: | Phred White | Date: | Tue, 15 Sep 2009 06:05:00 +0000 |
| Subject: | Re: APC - Upload progress problem. apc | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298059@lists.php.net to get a copy of this message | ||
Folks:
Thanks for all your help and suggestions.
Miracle of miracles I am now getting a response,so I can start some level of debugging.
I am not sure exactly what has been going on. I NEVER got a response, then I did - when I tried uploading some different files. It seems that larger files always give a negative response for me. Now I am thinking that it has been a timing issue. My ajax stuff doesn't repeat yet, so there is currently only one request. It seems that if the file is a little too large, the first response is always false, that may be the case for very small files too. I finally just picked a file that was the right size.
Since I could never verify that APC was responding, it didn't occur to me to go ahead and iron out the ajax stuff.
Anyway now I can move forward.
Thanks all for all your suggestions, sorry this ends up being such a stupid conclusion.
Your, phred
On Sep 14, 2009, at 8:33 PM, Nathan Nobbe wrote:
On Mon, Sep 14, 2009 at 4:50 PM, Phred White <phplist@planetphred.com>wrote: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.what about your other apc.rfc1867 settings? are you posting the correct field to the server to tell apc to start tracking, and also are you grabbing the correct value when trying to determine the status in your progress tracking script? by default, your form needs an input like, <input type="hidden" name="APC_UPLOAD_PROGRESS"id="progress_key" value="<?php echo $id?>"/>then in the progress checking script you will need something like, <?php if(isset($_GET['progress_key'])) { $status = apc_fetch('upload_'.$_GET['progress_key']); echo $status['current']/$status['total']*100; } ?> the names of these variables depend upon apc.rfc1867_name and apc.rfc1867_prefix respectively. take a look at this article, it was really helpful, http://www.ibm.com/developerworks/opensource/library/os-php-v525/ also, to get going fast, dont bother w/ the progress script yet. just focus on getting apc to start tracking the progress. you can use the stock apc.php script from the distro and upload a large file; this will give you time to check in apc.php. -nathan