Re: APC - Upload progress problem. apc

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

 



On Mon, Sep 14, 2009 at 4:50 PM, Phred White <phplist@xxxxxxxxxxxxxxx>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

[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