Permalink
Browse files

Fix #576: using ini_get() to detect if apc is enabled or not

  • Loading branch information...
1 parent 18cb551 commit d61ca42b08ccd1b0fb8654e1458500532896461b @appleboy appleboy committed with Phil Sturgeon Oct 15, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 system/libraries/Cache/drivers/Cache_apc.php
@@ -132,7 +132,7 @@ public function get_metadata($id)
*/
public function is_supported()
{
- if ( ! extension_loaded('apc') OR ! function_exists('apc_store'))
+ if ( ! extension_loaded('apc') OR ini_get('apc.enabled') != "1")
{
log_message('error', 'The APC PHP extension must be loaded to use APC Cache.');
return FALSE;
@@ -148,4 +148,4 @@ public function is_supported()
// End Class
/* End of file Cache_apc.php */
-/* Location: ./system/libraries/Cache/drivers/Cache_apc.php */
+/* Location: ./system/libraries/Cache/drivers/Cache_apc.php */

0 comments on commit d61ca42

Please sign in to comment.