When using the php-apcu (https://github.com/krakjoe/apcu) extension (not apc) in a php CGI environment the stored data fromapc_store
are empty.
Anyone has experiences on how to solve this issue?
Example PHP File: test-apc.php
<?php
$k = 'test';
if(isset($_GET['get'])) {
$result = apc_fetch($k);
echo "Read entry '$k': $result";
} else if(isset($_GET['clear'])) {
echo "Clear entry '$k'";
apc_clear_cache('user');
} else {
apc_store($k, "HelloWord");
echo "Write entry '$k' set";
}
print_r(apc_cache_info('user'));
?>
Steps to reproduce:
- Open
http://server/test-apc.php
to callapc_store
- Open
http://server/test-apc.php?get
to receive stored data usingapc_fetch
BTW: apc_cache_info('user') shows it properly with first request, second is empty
Relevant packages (OS: Debian 3.2.63):
- Apache 2.2.22 (mpm-prefork, suexec-custom, wrapper)
- php5.5 as CGI
- php5-apcu 4.0.7
- (and dependencies)