php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57665 APC User cache doesn't work with FastCGI
Submitted: 2007-05-11 04:37 UTC Modified: 2007-05-14 08:11 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: frasanz at unizar dot es Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: 5.2.1 OS: Windows server 2003
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-05-11 04:37 UTC] frasanz at unizar dot es
Description:
------------
APC Version	3.0.15-dev
PHP Version	5.2.1
APC Host	155.210.18.95
Server Software	Microsoft-IIS/6.0
Shared Memory	1 Segment(s) with 64.0 MBytes
(IPC shared memory, file locking)
Start Time	    2007/05/11 10:31:55
Uptime	           0 minutes (Uptime value doesn't change)
File Upload Support	1

apc.cache_by_default	1
apc.enable_cli	0
apc.enabled	1
apc.file_update_protection	2
apc.filters	
apc.gc_ttl	3600
apc.include_once_override	0
apc.localcache	0
apc.localcache.size	512
apc.max_file_size	1M
apc.num_files_hint	1000
apc.report_autofilter	0
apc.rfc1867	1
apc.shm_segments	1
apc.shm_size	64
apc.slam_defense	0
apc.stat	0
apc.stat_ctime	0
apc.ttl	7200
apc.user_entries_hint	4096
apc.user_ttl	7200
apc.write_lock	1

Reproduce code:
---------------
Script1---------
<?php
$bar = 'BAR';
apc_store('foo', $bar);
?>

Script2---------
<?php
var_dump(apc_fetch('foo'));
?> 

Expected result:
----------------
After running Script1+Script2:

string(3) "BAR"

Actual result:
--------------
After running Script1+Script2:

bool(false)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-12 20:42 UTC] scottmac@php.net
Do you have PHP configured as FastCGI, CGI or ISAPI?
 [2007-05-13 14:48 UTC] gopalv82 at yahoo dot com
More to the point, does this script work 

<?php
$bar = 'BAR';
apc_store('foo', $bar);
var_dump(apc_fetch('foo'));
?>

IIRC, fastcgi calls MINIT on modules *after* it has forked, which makes it nearly (well, nearly) impossible for apc to share data across them. CGI obviously will not work with the example below.
 [2007-05-14 02:40 UTC] frasanz at unizar dot es
The script:
<?php
$bar = 'BAR';
apc_store('foo', $bar);
var_dump(apc_fetch('foo'));
?>

Works.

PHP is configured as FASTCGI.
 [2007-05-14 08:08 UTC] frasanz at unizar dot es
You are right. Apc works fine with 
php configured as  ISAPI


Thanks
 [2007-05-14 08:11 UTC] gopalv82 at yahoo dot com
Closing this bug as WONTFIX for now.
 [2007-09-05 17:02 UTC] marcin dot wanat at gmail dot com
Do you mean, that it is impossible to share APC cache between different FCGI processes ? There is no way to share data between them ?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC