Qui non ci capisco tanto...ti posto una gran parte del testo
Speriamo che trovi l'errore...
class JCacheStorageJfdb extends JCacheStorage
{
private $db;
private $profile_db;
/* Constructor
*
* @access protected
* @param array $options optional parameters
*/
function __construct( $options = array() )
{
static $expiredCacheCleaned;
$this->profile_db = & JFactory::getDBO();
$this->db = clone ($this->profile_db);
$this->_language = (isset($options['language'])) ? $options['language'] : 'en-GB';
$this->_lifetime = (isset($options['lifetime'])) ? $options['lifetime'] : 60;
$this->_now = (isset($options['now'])) ? $options['now'] : time();
$config =& JFactory::getConfig();
$this->_hash = $config->getValue('config.secret');
// if its not the first instance of the joomfish db cache then check if it should be cleaned and otherwise garbage collect
if (!isset($expiredCacheCleaned)) {
// check a file in the 'file' cache to check if we should remove all our db cache entries since cache manage doesn't handle anything other than file caches
$conf =& JFactory::getConfig();
$cachebase = $conf->getValue('config.cache_path',JPATH_ROOT.DS.'cache');
$cachepath = $cachebase.DS."joomfish-cache";
if (!JFolder::exists($cachepath)){
JFolder::create($cachepath);
}
$cachefile = $cachepath.DS."cachetest.txt";
jimport("joomla.filesystem.file");
if (!JFile::exists($cachefile) || JFile::read($cachefile)!="valid"){
// clean out the whole cache
$this->cleanCache();
JFile::write($cachefile,"valid");
}
$this->gc();
}
$expiredCacheCleaned = true;
}
/**
* One time only DB setup function
*
*/
function setupDB() {
$db = & JFactory::getDBO();
$charset = ($db->hasUTF()) ? 'CHARACTER SET utf8 COLLATE utf8_general_ci' : '';
$sql = "CREATE TABLE IF NOT EXISTS `#__dbcache` ("
. "\n `id` varchar ( 32 ) NOT NULL default '',"
. "\n `groupname` varchar ( 32 ) NOT NULL default '',"
. "\n `expire` datetime NOT NULL default '0000-00-00 00:00:00',"
//. "\n `value` MEDIUMTEXT NOT NULL default '',"
. "\n `value` MEDIUMBLOB NOT NULL default '',"
. "\n PRIMARY KEY ( `id`,`groupname` ),"
. "\n KEY ( `expire`,`groupname` )"
. "\n ) $charset";
$db->setQuery( $sql );
if (!$db->query()){
echo $db->getErrorMsg()."
";
echo $db->_sql;
}
}