Alternative to apc_fetch?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Manfred Kooistra

    #1

    Alternative to apc_fetch?

    I'm trying to install a mixed PHP/JavaScript script, that Rasmus
    Lerdorf wrote, on my server. This script shows an upload progress bar
    while a file is uploaded through a form.

    Here is Rasmus' example: http://progphp.com/upload.php
    And here is the sourcecode: http://progphp.com/upload.phps

    The first lines of that script read:

    <?php
    if($_SERVER['REQUEST_METHOD ']=='POST') {
    $status = apc_fetch('uplo ad_'.$_POST['APC_UPLOAD_PRO GRESS']);
    $status['done']=1;
    echo json_encode($st atus);
    exit;
    } else if(isset($_GET['progress_key'])) {
    $status = apc_fetch('uplo ad_'.$_GET['progress_key']);
    echo json_encode($st atus);
    exit;
    }
    ?>
    <html>
    ....

    Then follows the html document with the JavaScript for an upload
    progress bar.

    Now, my problem is the following:

    I am on a shared server. I do have PHP 5.2, but I cannot install the
    APC extension, so of course Rasmus' code won't work on my homepage.

    So this is my question:

    Does anyone know an alternative for apc_fetch here?

    I can't really tell from the documentation on php.net, what this
    function would return here and what I might supply instead.

    Any help (even a link to a more detailed instruction to APC) would be
    very welcome.

  • Manfred Kooistra

    #2
    Re: Alternative to apc_fetch?

    Ah, well, I learned that it won't work without APC or some other
    extension that implements the file upload hooks.

    Off to bed :-)

    Comment

    Working...