qyyz348ldy Posted October 21, 2013 Share Posted October 21, 2013 (edited) I am install pretashop on localhost ,after this ,I add a module. then i post the code to my server ,I modify the settings.inc.php about the database path; i update the domain path in server database. But I get an error : Fatal error: Class 'Cache' not found in /home/ftp/g/geqixing2013/wwwroot/classes/ObjectModel.php on line 1513 the code blowe : if (is_object($class)) $class = get_class($class); if ($field === null) $cache_id = 'objectmodel_def_'.$class; if ($field !== null || !Cache::isStored($cache_id)) //P.s : line 1513 { $reflection = new ReflectionClass($class); $definition = $reflection->getStaticPropertyValue('definition'); $definition['classname'] = $class; if (!empty($definition['multilang'])) $definition['associations'][Collection::LANG_ALIAS] = array( 'type' => self::HAS_MANY, 'field' => $definition['primary'], 'foreign_field' => $definition['primary'], ); if ($field) return isset($definition['fields'][$field]) ? $definition['fields'][$field] : null; Cache::store($cache_id, $definition); return $definition; } return Cache::retrieve($cache_id); so I alse view this pre topics fllower http://www.prestashop.com/forums/topic/248711-fatal-error-class-cache-not-found/ http://www.prestashop.com/forums/topic/217916-solved-prestashop-1531-objectmodel-class-changes/ but util now,the problem is always exists. someone know how to solved it . P.s. : I am using the version of the last version:1.5.6 Edited December 16, 2013 by El Patron (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted October 21, 2013 Share Posted October 21, 2013 have you deleted or modified the 'cache' folder? Link to comment Share on other sites More sharing options...
qyyz348ldy Posted October 22, 2013 Author Share Posted October 22, 2013 have you deleted or modified the 'cache' folder? YES , Before I upload files,I delete all files under the cache folder, because this ? Link to comment Share on other sites More sharing options...
bellini13 Posted October 22, 2013 Share Posted October 22, 2013 this is not a good idea. there are files and folders that need to exist under cache. 1 Link to comment Share on other sites More sharing options...
OumMuhammad93 Posted December 15, 2013 Share Posted December 15, 2013 this is not a good idea. there are files and folders that need to exist under cache. Hello, It seems that I have the same problem. I delete the cache file in cache folder then I have reloaded it via ftp but my website is still not available. Message error : Fatal error: Class 'Cache' not found in /var/www/prestashop/classes/ObjectModel.php on line 1537 Please there is someone who can help me ? Thanks by advance. Link to comment Share on other sites More sharing options...
El Patron Posted December 16, 2013 Share Posted December 16, 2013 Hello, It seems that I have the same problem. I delete the cache file in cache folder then I have reloaded it via ftp but my website is still not available. Message error : Fatal error: Class 'Cache' not found in /var/www/prestashop/classes/ObjectModel.php on line 1537 Please there is someone who can help me ? Thanks by advance. try this, delete "class_index.php" in cache folder. 2 Link to comment Share on other sites More sharing options...
GeertN Posted December 16, 2013 Share Posted December 16, 2013 Thank you El Patron!! 1 Link to comment Share on other sites More sharing options...
MarcoVan Posted June 19, 2014 Share Posted June 19, 2014 Hi El Patron, This was my solution also! Great! Can you please tell what is in the class_index.php. Why is this necessary? Thank you 1 Link to comment Share on other sites More sharing options...
NishantVadgama Posted June 23, 2014 Share Posted June 23, 2014 try this, delete "class_index.php" in cache folder. thank you vary much it works 1 Link to comment Share on other sites More sharing options...
deportelle Posted July 31, 2015 Share Posted July 31, 2015 (edited) Hi, I have the same issue : Fatal error : Class 'Cache' not found in /www/classes/ObjectModel.php on line 1552 But I checked my FTP, I don't have any Cache folder, so I cannot delete the class_index.php file... What's wrong with it ? Thanks, Edit : I have Prestashop 1.6 Edited July 31, 2015 by deportelle (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted July 31, 2015 Share Posted July 31, 2015 Hi, I have the same issue : But I checked my FTP, I don't have any Cache folder, so I cannot delete the class_index.php file... What's wrong with it ? Thanks, Edit : I have Prestashop 1.6 hi, all ps releases have folder in your shop root called 'cache'. If you are missing this folder and still running, wow you lucky. If you re-check and do not have this folder, then I would download the native PS that matches your version from here: https://www.prestashop.com/en/developers-versions#previous-version unpack/unzip the installation, then you can ftp the cache folder up, then delete the file. good luck, el Link to comment Share on other sites More sharing options...
bellini13 Posted July 31, 2015 Share Posted July 31, 2015 The error says that the Cache CLASS is missing. This is not a folder, but a file in the classes folder. So first confirm that you have a file /www/classes/Cache.php Link to comment Share on other sites More sharing options...
binunice Posted November 15, 2016 Share Posted November 15, 2016 Pls check the folder /classes/cache has following files: Cache.php CacheApc.php CacheMemcache.php CacheMemcached.php CacheXcache.php index.php If not get it from the installation archive for your PS version. Link to comment Share on other sites More sharing options...
ingrossoerisparmio Posted February 3, 2017 Share Posted February 3, 2017 try this, delete "class_index.php" in cache folder. Thank youuuuuuuuuuu I love this man 1 Link to comment Share on other sites More sharing options...
uslumotor Posted February 16, 2017 Share Posted February 16, 2017 Pls check the folder /classes/cache has following files: Cache.php CacheApc.php CacheMemcache.php CacheMemcached.php CacheXcache.php index.php If not get it from the installation archive for your PS version. Thanks a lot. i can't solve my problem only deleting "class_index.php" file. i solve my problem when put these file in recent folder and then delete "class_index.php" file. Link to comment Share on other sites More sharing options...
elif44 Posted February 21, 2017 Share Posted February 21, 2017 Solution: manual update Link to comment Share on other sites More sharing options...
Juan85 Posted July 7, 2017 Share Posted July 7, 2017 (edited) try this, delete "class_index.php" in cache folder. Me fue de utilidad, gracias!! Edited July 7, 2017 by Extremovirtual (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts