I'm writing a wordpress plugin where the CSS is compiled dinamically and thus i've implemented various strategies to cache it. As of now the first choice for caching is APC if it's installed.
This is how i'm checking it
$is_apc_installed = function_exists('apc_store')
&& function_exists('apc_fetch') && ini_get('apc.enabled');
$sapi_type = php_sapi_name();
if (substr($sapi_type, 0, 3) === 'cgi') {
$is_apc_installed = false;
}
but on some installs i still get that apc_fetch() always return false. What else should i check to be sure that APC is working correctly?
Step 1: We will download require a version of APCu file from here. This page will have a table with all available releases. Step 2: Let's copy the above dll file and paste it into c:/wamp/bin/php/ext/ folder. Step 3: We will restart the wamp or machine.
You can try the extension_loaded function
$is_apc_installed = extension_loaded('apc');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With