lgstern Posted February 10, 2019 Share Posted February 10, 2019 My site has gone down with a "500 server error". I tried to get on the admin page but it says. [PrestaShopException] APC cache has been enabled, but the APC or APCu extension is not availableat line 43 in file classes/cache/CacheApc.php 38. * CacheApcCore constructor. 39. */ 40. public function __construct() 41. { 42. if (!extension_loaded('apc') && !extension_loaded('apcu')) { 43. throw new PrestaShopException('APC cache has been enabled, but the APC or APCu extension is not available'); 44. } 45. $this->apcu = extension_loaded('apcu'); 46. } 47. 48. /** CacheApcCore->__construct - [line 181 - classes/cache/Cache.php] CacheCore::getInstance - [line 581 - classes/db/Db.php] DbCore->executeS - [line 344 - classes/shop/Shop.php] - [1 Arguments] ShopCore::initialize - [line 119 - config/config.inc.php] require - [line 42 - admin/index.php] - [1 Arguments] It seems that APC is enabled but the extension is not available. Not being an expert I wondered if I could disable it then maybe I could get into the Admin. Is there a file I can modify to disable APC? Any help is GREATLY appreciated. Link to comment Share on other sites More sharing options...
Disappointed Posted May 24, 2022 Share Posted May 24, 2022 On 2/11/2019 at 6:25 AM, lgstern said: My site has gone down with a "500 server error". I tried to get on the admin page but it says. [PrestaShopException] APC cache has been enabled, but the APC or APCu extension is not availableat line 43 in file classes/cache/CacheApc.php 38. * CacheApcCore constructor. 39. */ 40. public function __construct() 41. { 42. if (!extension_loaded('apc') && !extension_loaded('apcu')) { 43. throw new PrestaShopException('APC cache has been enabled, but the APC or APCu extension is not available'); 44. } 45. $this->apcu = extension_loaded('apcu'); 46. } 47. 48. /** CacheApcCore->__construct - [line 181 - classes/cache/Cache.php] CacheCore::getInstance - [line 581 - classes/db/Db.php] DbCore->executeS - [line 344 - classes/shop/Shop.php] - [1 Arguments] ShopCore::initialize - [line 119 - config/config.inc.php] require - [line 42 - admin/index.php] - [1 Arguments] It seems that APC is enabled but the extension is not available. Not being an expert I wondered if I could disable it then maybe I could get into the Admin. Is there a file I can modify to disable APC? Any help is GREATLY appreciated. Any solutions to the above post which is not mine but I have the same issue after the host migrated the site for me. In my case I went to PHP and enabled APCu extension but still throws up the same error and a 500 error. I can not get into the back office Link to comment Share on other sites More sharing options...
Prestachamps Posted May 24, 2022 Share Posted May 24, 2022 Hi, Did you delete all items inside the Var/cache/dev and Var/cache/prod ? Cheers, Leo Link to comment Share on other sites More sharing options...
Disappointed Posted May 24, 2022 Share Posted May 24, 2022 56 minutes ago, Prestachamps said: Hi, Did you delete all items inside the Var/cache/dev and Var/cache/prod ? Cheers, Leo Hi Leo The hosting company transferred it so I thought they know what to do but sent me a message to contact our developer which I dont have. So no I deleted nothing. The folders you mention have lots of subfolders and files so should I delete something? Attachment is part of dev Link to comment Share on other sites More sharing options...
Prestachamps Posted May 24, 2022 Share Posted May 24, 2022 Hi, Yes you can. Prestashop will also recreate the dev and prod folders, however just delete the contents from it (eventually make a copy somewhere- even thought everything should be fine- but backups are any respected programmers best practice) Let me know if it worked. Cheers, Leo Link to comment Share on other sites More sharing options...
Disappointed Posted May 24, 2022 Share Posted May 24, 2022 14 minutes ago, Prestachamps said: Hi, Yes you can. Prestashop will also recreate the dev and prod folders, however just delete the contents from it (eventually make a copy somewhere- even thought everything should be fine- but backups are any respected programmers best practice) Let me know if it worked. Cheers, Leo OK I will give it a go thanks I still have the site on the old server so can use it for a backup. Cheers Link to comment Share on other sites More sharing options...
Disappointed Posted May 24, 2022 Share Posted May 24, 2022 Problem solved. Did exactly what Prestachamps said to do and all good again. Took 30 seconds but was stressful deleting those files. Thank you very much for your help and much appreciated. Link to comment Share on other sites More sharing options...
El Patron Posted May 24, 2022 Share Posted May 24, 2022 I've seen clients and forum members using host cache, weird results in cart for example. Memcache seems to work but we don't use "any cache' outside of mod_expires and of course smarty cache and tuning mysql config cache. Php 7 cache is fine as well. Use cache that works for nonstatic content only, there are not many. Link to comment Share on other sites More sharing options...
Norbert2 Posted December 7 Share Posted December 7 I had the same message today on my website. For me, Prestachamps, advice did not work. For anyone that seems to have the same issue, and the Prestachamps solution doesn't work for them.Try the following. Go into your PHP settings/selector in cPanel or Plesk and enable/tick the 'apcu'. Save it after and reload your website. It should work. Also, you might want to clear the Var/cache/dev and Var/cache/prod as Prestachamps recommended before hand, just in case that also has a correlation. Although, clearing those files did nothing on my server. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now