Jump to content
thirty bees forum
  • 1

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


Question

Posted

Hi,

While running the TB migrator module we came along the following error when pressing configure:

[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.     /**

    CacheApcCore->__construct - [line 131 - classes/cache/Cache.php]
    CacheCore::getInstance - [line 175 - modules/psonesixmigrator/psonesixmigrator.php]
    PsOneSixMigrator->getContent - [line 868 - controllers/admin/AdminModulesController.php]
    AdminModulesControllerCore->postProcessCallback - [line 1117 - controllers/admin/AdminModulesController.php]
    AdminModulesControllerCore->postProcess - [line 178 - classes/controller/Controller.php]
    ControllerCore->run - [line 43 - override/classes/controller/Controller.php]
    Controller->run - [line 367 - classes/Dispatcher.php]
    DispatcherCore->dispatch - [line 58 - admin/index.php]

Can I just under WHM -> Module Installers -> install those modules? Without interfering in the current installations?

Or does this error comes from somewhere else? In my mind it did not happen on another installation on the same server (php.ini is not changed)

We are trying the migrator in a test environment.

Capture.JPG

12 answers to this question

Recommended Posts

  • 0
Posted

You can either install the apcu extension, or modify configuration of your prestashop you are migrating from and change the caching system in /config/settins.inc.php to something else

  • 0
Posted

Does anybody use APC Cache?

When I try to save a manufacturer in BO, I also get: APCu cache has been enabled, but the APCu extension is not available.

Edit: Probably this was caused, since I changed the php version some time ago...

  • 0
Posted
On 4/23/2019 at 8:15 AM, wakabayashi said:

Does anybody use APC Cache?

When I try to save a manufacturer in BO, I also get: APCu cache has been enabled, but the APCu extension is not available.

Edit: Probably this was caused, since I changed the php version some time ago...

That's exactly when I get this! When I save a manufacturer. How is this fixed? I can't add any manufactures now, and I am starting to get more clients. Please assist asap. 😞

  • 0
Posted
        if (!extension_loaded('apcu')) {
            throw new PrestaShopException('APCu cache has been enabled, but the APCu extension is not available');
        }

This exception is thrown because apcu php extension is not loaded. You need to configure your server. How to do this exactly depends on your hosting provider, on platform you are using, etc. For inspiration: https://serverpilot.io/docs/how-to-install-the-php-apcu-extension/

  • Thanks 1
  • 0
Posted
On 12/18/2020 at 10:59 PM, the.rampage.rado said:

No issues for me when using apcu

Are you still using APCu? As this caching topic is very complex, I would like to know your experience with it!? Are there any cases, when visitors see "old" content?

Example: You change a price or description in BO and the visitor sees the old stuff in FO for some time. That is basically my main fear with caches 🫣

  • 0
Posted (edited)

To not confuse others: this I just my fear in mind. I never have seen it here too. I just wanted to know from somebody that use it for a long time 👍

Thanks for the Litespeed tipp. I will look into this too 😎

Edit: Do you use nginx? Cause I am right now, not sure if it make sense to use Litespeed and nginx together :S

Edited by wakabayashi

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...