Bug #8810: Better error message if someone did not configure their system properly
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 8 Jan 2010 20:27:43 +0000 (13:27 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 8 Jan 2010 20:27:43 +0000 (13:27 -0700)
framework/Cache/lib/Horde/Cache/Eaccelerator.php
horde/config/conf.xml

index 83e25b8..4ffc095 100644 (file)
  */
 class Horde_Cache_Eaccelerator extends Horde_Cache_Base
 {
+     /**
+      * Construct a new Horde_Cache object.
+      *
+      * @param array $params  Parameter array.
+      * @throws Horde_Exception
+      */
+    public function __construct($params = array())
+    {
+        if (!function_exists('eaccelerator_gc')) {
+            throw new Horde_Exception('eAccelerator must be compiled with support for shared memory to use as caching backend.');
+        }
+
+        parent::__construct($params);
+    }
+
     /**
      * Attempts to retrieve a piece of cached data and return it to the caller.
      *
index 0ccd737..1fd4084 100644 (file)
    commonly processed objects.">file
     <case name="none" desc="Don't cache any objects"/>
     <case name="apc" desc="Use the APC cache"/>
-    <case name="eaccelerator" desc="Use the eAccelerator cache"/>
+    <case name="eaccelerator" desc="Use the eAccelerator cache">
+     <configdescription>
+     eAccelerator must be built with --with-eaccelerator-shared-memory at
+     compile time to allow caching.
+     </configdescription>
+    </case>
     <case name="memcache" desc="Use a Memcache server"/>
     <case name="xcache" desc="Use the xCache cache"/>
     <case name="file" desc="Store objects in filesystem">