I'm running nginx+php-fpm and I had the apc.ini loading the apc.so library. There was no other config so I added this config to the apc.ini file:
extension
=apc
.so
apc
.enabled
=1apc
.shm_size
=2G
## PHP file cache 1 hour ##
apc
.ttl
=3600## User cache 2 hour ##
apc
.user_ttl
=7200## Garbage collection 1 hour ##
apc
.gc_ttl
=3600apc
.max_file_size
=1M
## check if the script has been changed ##
apc
.stat=1
The site feels faster so I think it is working but I'm completely unsure if it is or not. How do I tell if APC is working? Something like the memcache stats that I can see somewhere?
Void
print_r(apc_cache_info());
?>
This shows you the stats and that it is working or not. You should also be able to do a php_info() and see APC there as well. APC has cache info just like memcache - ?[url=http://www.php.net/manual/en/function.apc-cache-info.php]apc_cache_info()[/url] Just dump it using print_r in a script and you'll be able to see the stats. [code=php][/code] This shows you the stats and that it is working or not. You should also be able to do a php_info() and see APC there as well.
Are you sure you want to delete this post?