From f54ad06db1b19f6ec4e1c1c98edb731b382a6fee Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 8 Jan 2010 13:27:43 -0700 Subject: [PATCH] Bug #8810: Better error message if someone did not configure their system properly --- framework/Cache/lib/Horde/Cache/Eaccelerator.php | 15 +++++++++++++++ horde/config/conf.xml | 7 ++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/framework/Cache/lib/Horde/Cache/Eaccelerator.php b/framework/Cache/lib/Horde/Cache/Eaccelerator.php index 83e25b855..4ffc0951d 100644 --- a/framework/Cache/lib/Horde/Cache/Eaccelerator.php +++ b/framework/Cache/lib/Horde/Cache/Eaccelerator.php @@ -13,6 +13,21 @@ */ 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. * diff --git a/horde/config/conf.xml b/horde/config/conf.xml index 0ccd737af..1fd4084b7 100644 --- a/horde/config/conf.xml +++ b/horde/config/conf.xml @@ -1109,7 +1109,12 @@ commonly processed objects.">file - + + + eAccelerator must be built with --with-eaccelerator-shared-memory at + compile time to allow caching. + + -- 2.11.0