Forums / Setup & design / Undefined variable: cacheDir, cachePath, keyString
Carl Heaton
Thursday 10 March 2005 12:52:06 am
I get the following error on every first page load after clearing *all* caches. I checked the relevant ini's as described within http://ez.no/community/forum/setup_design/something_terribly_wrong_with_ez_cache
Undefined variable: cacheDir in /home/www/dev/var/plain/cache/template/compiled/pagelayout-4f0eb7d9e6988bca5c6db687d142a069.php on line 289 Undefined variable: cachePath in /home/www/dev/var/plain/cache/template/compiled/pagelayout-4f0eb7d9e6988bca5c6db687d142a069.php on line 289 Undefined variable: keyString in /home/www/dev/var/plain/cache/template/compiled/pagelayout-4f0eb7d9e6988bca5c6db687d142a069.php on line 289
-bash-3.00$ pwd /home/www/dev/settings -bash-3.00$ grep -Ri cacheDir * site.ini:CacheDir=cache site.ini:CacheDir=content texttoimage.ini:CacheDir=var/cache/texttoimage -bash-3.00$ grep -Ri cachePath * nothing -bash-3.00$ grep -Ri keyString * nothing --- -bash-3.00$ pwd /home/www/dev/settings/siteaccess/plain_user -bash-3.00$ grep -Ri cacheDir * -bash-3.00$ grep -Ri cachePath * -bash-3.00$ grep -Ri keyString *
Should I be specifying these vars somewhere?
--- Carl {'EZP 3.5, Apache 2, FC2, PHP 4.3.4 (cgi), MySQL 4.1.9'}
Frederik Holljen
Friday 11 March 2005 12:12:11 am
The settings you are looking for should be set in site.ini. Check the following: - are the settings actually defined in the correct sections of the configuration file.- check if caches are actually created where you expect them to be (sounds like it since it only complains the first time)
Frey Staso
Friday 11 March 2005 4:33:11 pm
I JUST had this problem myself, it was driving me and the sys admin crazy, we tried refreshing everything, changing the file, and then eventually deleting the file.
What was happening was no matter what I did, it still gave the error. Eventually I backed up that specific file and deleted it on the server, but it still had it cached somehow.
To solve the problem, we backstepped and deleted everything (all folders and files) under home/www/dev/var/plain/cache/ and on a next refresh, Exponential was fine. MAKE SURE YOU BACK THOSE FILES UP FIRST!!!!
Łukasz Serwatka
Saturday 12 March 2005 5:41:04 am
Hi Carl,
Try to add keys string in {cache-block}
{cache-block expiry=300 keys=$node.node_id}
and clear the cache.
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog