APC not Caching Properly
Posted by: discomatt
Posted on: 2007-12-11 09:48:00
After following the guides/scripts on the Wiki and a bit of playing, I managed to install a custom build of PHP 5.2.0 and APC 3.0.14
I've replicated this install on a local server as well.
Locally, the caching works like a charm! When I upload my script, however, it seems to go bonkers on me. APC is listed in phpinfo(), and calling the functions does not result in an error, but the variables set will not hold... here's an example
fail.php
<?php
apc_store('test', 'Hello World', 500);
$bar = 'BAR';
apc_store('foo', $bar);
echo 'Output apc_fetch vars <br />';
var_dump(apc_fetch('foo'));
echo '<br />';
echo apc_fetch('test');
echo '<br />';
echo 'Output cache info <pre>';
print_r(apc_cache_info());
echo '</pre>';
?>
<br />
<br />
<br />
<iframe src="fail_frame.php"></iframe>
fail_frame.php
<?php
echo apc_fetch('test');
?>
<br />
<br />
<input type=button value="Refresh" onClick="history.go()" />
in action
http://www.doodoostyle.com/apctest/fail/fail.php
my APC INFO
http://www.doodoostyle.com/apctest/debug/apc.php
Any help would be greatly appreciated. I hope i didn't miss anything super obvious... It's just odd it works locally and not on DH's servers.