Jump to content

APC cache has been enabled, but the APC or APCu extension is not available


Recommended Posts

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 available
at 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.     /**

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

  • 3 years later...
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 available
at 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.     /**

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

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

var.thumb.PNG.86d878879a04552ecea21e728bdc4c39.PNG

Link to comment
Share on other sites

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

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

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

  • 2 years later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...