php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58146 apc.rfc1867 Doesn't Work On FCGI
Submitted: 2008-04-06 05:04 UTC Modified: 2009-03-24 14:42 UTC
From: phil at pchowtos dot co dot uk Assigned:
Status: Not a bug Package: APC (PECL)
PHP Version: 5.2.5 OS: Debian
Private report: No CVE-ID: None
 [2008-04-06 05:04 UTC] phil at pchowtos dot co dot uk
Description:
------------
This bug is active on both CVS and 3.0.18.

Here is the APC config in php.ini:

[apc]
apc.enabled             = 1
apc.shm_segments        = 1
apc.shm_size            = 100
apc.optimization        = 0
apc.ttl                 = 7200
apc.user_ttl            = 7200
apc.num_files_hint      = 1000
apc.mmap_file_mask      = /tmp/apc.XXXXXX
apc.rfc1867 = on

APC's page caching works correctly.

Reproduce code:
---------------
<?php
$_SESSION['uploadid'] = uniqid();
?>

<form name="upload" method="post" action='/order/step5.php' enctype="multipart/form-data">
<input type="hidden" name="APC_UPLOAD_PROGRESS" value="<?= $_SESSION['uploadid']; ?>" />
<input type="file" name="upload1" /> <br />
<input type="image" src="../img/order/button_continue.gif" width="99" height="22" border="0" />
</form>

Expected result:
----------------
I expect upload_* entries to appear in the APC user cache as they do when the exact same code is run on an Apache server with mod_php.

Actual result:
--------------
No entries appear in the APC user cache.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-10 07:42 UTC] gopalv82 at yahoo dot com
APC's upload progress works using the user cache.

The user cache is *not* shared between fastCGI instances because they fork and *then* MINIT, rather than MINIT & fork (in apache2/apache land).

It won't work the way it's done right now and it probably won't have a fix as long as upload progress uses user cache - I might work out an alternate fix for this, but please don't hold you breath.
 [2008-04-10 07:54 UTC] phil at pchowtos dot co dot uk
Thanks for the reply and stoping me fruitlessly trying to get this working. I thought this might be the problem but was thrown off track by the fact the System Cache worked which I understand is also in shared memory - but I assume that works differently.

I have found http://pecl.php.net/package/uploadprogress as a not-so-good-but-ok solution to monitoring uploads for us FCGI users as it writes to a tmp file rather than memory. It's rather undocumented and requires a little bit of source reading to find out how to use it - if any other FCGI users are interested in another solution.
 [2009-03-24 14:42 UTC] shire@php.net
Closing this bug, as it's not expected behavior until we add a feature to support sharing the cache between processes which is it's own issue.
 [2013-09-19 09:48 UTC] amit dot kumar at routesms dot com
Please make sure your php version is greater or equal to 5.2.
APC is not working in 5.1.* versions.
Upgrade your php version "http://drup.org/upgrading-centos-5-php-5.3"
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 04:01:29 2024 UTC