Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"APC cache has been enabled, but the APC or APCu extension is not available" message, with cache DISABLED #26428

Closed
elmanu13 opened this issue Oct 26, 2021 · 2 comments
Labels
1.7.8.0 Affects versions Advanced parameters Component: Which BO section is concerned BO Category: Back Office Bug Type: Bug Import / Export Label: Which BO under menu is concerned

Comments

@elmanu13
Copy link

Describe the bug

Trying to import products after a server update and PHP version changed (from 7.2 to 7.4, without APC enabled) and got a server error 500:

[PrestaShopException]

APC cache has been enabled, but the APC or APCu extension is not available
at line 43 in file classes/cache/CacheApc.php

  1.  * CacheApcCore constructor.
    
  2.  */
    
  3. public function __construct()
    
  4. {
    
  5.     if (!extension_loaded('apc') && !extension_loaded('apcu')) {
    
  6.         throw new PrestaShopException('APC cache has been enabled, but the APC or APCu extension is not available');
    
  7.     }
    
  8.     $this->apcu = extension_loaded('apcu');
    
  9. }
    
  10. /**
    

    CacheApcCore->__construct - [line 184 - classes/cache/Cache.php]
    CacheCore::getInstance - [line 348 - classes/db/Db.php]
    DbCore->enableCache - [line 4646 - controllers/admin/AdminImportController.php]
    AdminImportControllerCore->postProcess - [line 295 - classes/controller/Controller.php]
    ControllerCore->run - [line 518 - classes/Dispatcher.php]
    DispatcherCore->dispatch - [line 93 - admin/index.php]

But when you go in the parameters, the cache is DISABLED (it was enabled a long time ago, disabled before the update)

Capture d’écran 2021-10-26 à 14 31 12

I think there is the APC parameter still present somewhere in the system.

Additional information

  • PrestaShop version: 1.7.8.0
  • PHP version: 7.4
@florine2623
Copy link
Contributor

Hello @elmanu13 ,

I changed my version of PHP from 7.2 to 7.4 using PS 1.7.8.0, I didn't encounter any error during import of products.

I followed these steps :

  1. Go to BO > Advanced parameters > Informations > See PHP 7.2
  2. Change version of PHP to 7.4
  3. Restart server
  4. Import products in BO > Advanced Parameters > Import > Choose Products and your import file
  5. Import product went well, no error :

Screenshot 2021-10-26 at 17 20 22

Cache is disabled :
Screenshot 2021-10-26 at 17 20 54

Please check and feedback.
Thanks!

@florine2623 florine2623 added 1.7.8.0 Affects versions Advanced parameters Component: Which BO section is concerned BO Category: Back Office Bug Type: Bug Import / Export Label: Which BO under menu is concerned NMI Status: issue needs more information labels Oct 26, 2021
@florine2623
Copy link
Contributor

Hello @elmanu13 ,

Since we had no news from you, I'll close this ticket to avoid cluttering up the backlog. Please note that you can always create a new one if further information pops up.

Thank you

@florine2623 florine2623 removed the NMI Status: issue needs more information label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.8.0 Affects versions Advanced parameters Component: Which BO section is concerned BO Category: Back Office Bug Type: Bug Import / Export Label: Which BO under menu is concerned
Projects
None yet
Development

No branches or pull requests

2 participants