# APCu not available for local cache but tried everything / no backend warning / PHP 8.3.15

**URL:** <https://help.nextcloud.com/t/apcu-not-available-for-local-cache-but-tried-everything-no-backend-warning-php-8-3-15/214782>\
**Category:** ℹ️ Support\
**Tags:** apcu, nc30, php83\
**Created:** [January 12, 2025, 5:54pm UTC](https://help.nextcloud.com/t/apcu-not-available-for-local-cache-but-tried-everything-no-backend-warning-php-8-3-15/214782 "2025-01-12T17:54:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zentrix](https://help.nextcloud.com/letter_avatar/zentrix/32/5_5575768a8748004e209b776fc1b2916d.png) [@zentrix](https://help.nextcloud.com/u/zentrix)\
**Post date:** [January 12, 2025, 5:54pm UTC](https://help.nextcloud.com/t/apcu-not-available-for-local-cache-but-tried-everything-no-backend-warning-php-8-3-15/214782/1 "2025-01-12T17:54:57Z")

</div>

I tried everything, for hours…

## The Basics

- Nextcloud Server version:
  - `Nextcloud Hub 9 (30.0.4)`

- Operating system and version _(e.g., Ubuntu 24.04)_:
  - `Ubuntu 22.04`

- Web server and version _(e.g, Apache 2.4.25)_:
  - `Apache/2.4.52 (Ubuntu)`

- PHP version _(e.g, 8.3)_:
  - `PHP 8.3.15`

- Is this the first time you’ve seen this error? (Yes / No):
  - `yes`

- When did this problem seem to first start?
  - `nextcloud installation`

- Installation method _(e.g. AlO, NCP, Bare Metal/Archive, etc.)_
  - `down know, downloaded and unzip`

- Are you using CloudfIare, mod\_security, or similar? _(Yes / No)_
  - `don't know`

### Summary of the issue you are facing:

Hello, I tried almost everything and finally get rid of the warning in the backend. But still cannot use occ commands:

```auto
# sudo -u www-data php occ status
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

```

### Steps to replicate it (hint: details matter!):

1. Install NC
2. Try to enable APCu
3. try occ command

### Log entries

#### Nextcloud

```auto
nothing in log file

```

### Configuration

#### Nextcloud

The output of `occ config:list system` or similar is best, but, if not possible, the contents of your `config.php` file from `/path/to/nextcloud` is fine (make sure to remove any identifiable information!):

```auto
  'installed' => true,
  'maintenance_window_start' => 1,
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),

```

#### Apps

The output of `occ app:list` (if possible).#  
error using occ

Any solutions?

I can use occ commands when I remove line in NC config.php:  
‘memcache.local’ =\> ‘\OC\Memcache\APCu’,

update:  
I tried also:

```auto
/etc/php/8.3/fpm/php.ini:
        extension = apcu.so
/etc/php/8.3/apache2/php.ini : 
      apc.enable_cli=1
      redis.session.locking_enabled=1
      redis.session.lock_retries=-1
      redis.session.lock_wait_time=10000
systemctl restart apache2 && systemctl restart redis-server

```

Additional Info:  
I had some 8.4 default on command line. I deleted it. Now:

```auto
# update-alternatives --config php
There is only one alternative in link group php (providing /usr/bin/php): /usr/bin/php8.3

```

also phpinfo:

```auto
|apc.enable_cli|On
|apc.enabled|On

```

Thank you!

---

<div class="post-metadata">

**Author:** ![rakekniven](https://help.nextcloud.com/user_avatar/help.nextcloud.com/rakekniven/32/67096_2.png) [@rakekniven](https://help.nextcloud.com/u/rakekniven)\
**Post date:** [January 12, 2025, 6:24pm UTC](https://help.nextcloud.com/t/apcu-not-available-for-local-cache-but-tried-everything-no-backend-warning-php-8-3-15/214782/2 "2025-01-12T18:24:48Z")

</div>

> [@zentrix](#):
>
> `Is the matching PHP module installed and enabled?`

What does this tells you?

`php -m | grep apcu`

---

<div class="post-metadata">

**Author:** ![zentrix](https://help.nextcloud.com/letter_avatar/zentrix/32/5_5575768a8748004e209b776fc1b2916d.png) [@zentrix](https://help.nextcloud.com/u/zentrix)\
**Post date:** [January 12, 2025, 6:53pm UTC](https://help.nextcloud.com/t/apcu-not-available-for-local-cache-but-tried-everything-no-backend-warning-php-8-3-15/214782/3 "2025-01-12T18:53:46Z")

</div>

Hello

```auto
 # php -m | grep apcu
apcu

# php -v
PHP 8.3.15 (cli)

# phpinfo apache = 8.3.15

# ls -lh /etc/php/8.3/cli/conf.d/ | grep apcu
lrwxrwxrwx 1 root root 36 Jan 8 21:22 20-apcu.ini -> /etc/php/8.3/mods-available/apcu.ini

```

I can use occ commands when I remove line:  
‘memcache.local’ =\> ‘\OC\Memcache\APCu’,

---

<div class="post-metadata">

**Author:** ![zentrix](https://help.nextcloud.com/letter_avatar/zentrix/32/5_5575768a8748004e209b776fc1b2916d.png) [@zentrix](https://help.nextcloud.com/u/zentrix)\
**Post date:** [January 12, 2025, 7:21pm UTC](https://help.nextcloud.com/t/apcu-not-available-for-local-cache-but-tried-everything-no-backend-warning-php-8-3-15/214782/4 "2025-01-12T19:21:09Z")

</div>

You tried not everything, you missed the last one:

Solution:  
nano /etc/php/8.3/cli/conf.d/20-apcu.ini  
→ apc.enable\_cli=1

Found:

> [@APCu not available for local cache but tried everything / no backend warning / PHP 8.3.15](https://help.nextcloud.com/t/apcu-not-available-for-local-cache-but-tried-everything-no-backend-warning-php-8-3-15/214782):
>
> I tried everything, for hours… The Basics Nextcloud Server version: Nextcloud Hub 9 (30.0.4) Operating system and version (e.g., Ubuntu 24.04): Ubuntu 22.04 Web server and version (e.g, Apache 2.4.25): Apache/2.4.52 (Ubuntu) PHP version (e.g, 8.3): PHP 8.3.15 Is this the first time you’ve seen this error? (Yes / No): yes When did this problem seem to first start? nextcloud installation Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.) down know, downloaded and un…

Not in NC documentation:  
[https://docs.nextcloud.com/server/latest/admin\_manual/configuration\_server/caching\_configuration.html](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html)

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/5_5575768a8748004e209b776fc1b2916d.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [January 12, 2025, 8:08pm UTC](https://help.nextcloud.com/t/apcu-not-available-for-local-cache-but-tried-everything-no-backend-warning-php-8-3-15/214782/5 "2025-01-12T20:08:28Z")

</div>

> [@zentrix](#):
>
> Not in NC documentation:  
> [Memory caching — Nextcloud latest Administration Manual latest documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html)

It is in there. You’re looking at the docs for the upcoming v31 however (where things have changed).

Check the [stable docs (for v30)](https://docs.nextcloud.com/#nextcloud-stable):

[https://docs.nextcloud.com/server/stable/admin\_manual/configuration\_server/caching\_configuration.html#id1](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/caching_configuration.html#id1)

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [January 20, 2025, 8:09pm UTC](https://help.nextcloud.com/t/apcu-not-available-for-local-cache-but-tried-everything-no-backend-warning-php-8-3-15/214782/6 "2025-01-20T20:09:02Z")

</div>

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.
