Module 'apcu' already loaded at Unknown#0

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version 19.0.2:
Operating system and version Ubuntu 18.04:
Apache or nginx version Apache 2.4.25:
PHP version 7.4:
The event log in settings / admin / logging is frequently filled with this error.
I have already read about this error articles but I cannot find a possible solution.
Could you give me some help?

root@cloud:~# php -i | grep apc
/etc/php/7.4/cli/conf.d/20-apcu.ini,
/etc/php/7.4/cli/conf.d/25-apcu_bc.ini
apc
apcu
apc.coredump_unmap => Off => Off
apc.enable_cli => Off => Off
apc.enabled => On => On
apc.entries_hint => 4096 => 4096
apc.gc_ttl => 3600 => 3600
apc.mmap_file_mask => no value => no value
apc.preload_path => no value => no value
apc.serializer => php => php
apc.shm_segments => 1 => 1
apc.shm_size => 32M => 32M
apc.slam_defense => Off => Off
apc.smart => 0 => 0
apc.ttl => 0 => 0
apc.use_request_time => On => On

The output of your Nextcloud log in Admin > Logging:

    [PHP] Error: Module 'apcu' already loaded at Unknown#0

    GET /ocm-provider/
    from xxx.xxx.xxx.xxx by myuser at 2020-09-03T15:41:51-04:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

    "system": {
                "instanceid": "***REMOVED SENSITIVE VALUE***",
                "passwordsalt": "***REMOVED SENSITIVE VALUE***",
                "secret": "***REMOVED SENSITIVE VALUE***",
                "trusted_domains": [
                    "url.dominio.net",
                    "1.1.1.1"
                ],
                "datadirectory": "***REMOVED SENSITIVE VALUE***",
                "dbtype": "mysql",
                "version": "19.0.2.2",
                "overwrite.cli.url": "https:\/\/url.dominio.net",
                "htaccess.RewriteBase": "\/",
                "dbname": "***REMOVED SENSITIVE VALUE***",
                "dbhost": "***REMOVED SENSITIVE VALUE***",
                "dbport": "",
                "dbtableprefix": "oc_",
                "mysql.utf8mb4": true,
                "dbuser": "***REMOVED SENSITIVE VALUE***",
                "dbpassword": "***REMOVED SENSITIVE VALUE***",
                "installed": true,
                "skeletondirectory": "",
                "mail_from_address": "***REMOVED SENSITIVE VALUE***",
                "mail_smtpmode": "smtp",
                "mail_sendmailmode": "smtp",
                "mail_domain": "***REMOVED SENSITIVE VALUE***",
                "mail_smtpauth": 1,
                "mail_smtpauthtype": "LOGIN",
                "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
                "mail_smtpport": "25",
                "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
                "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
                "default_language": "es",
                "ldapIgnoreNamingRules": false,
                "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
                "memcache.local": "\\OC\\Memcache\\APCu",
                "memcache.distributed": "\\OC\\Memcache\\Redis",
                "memcache.locking": "\\OC\\Memcache\\Redis",
                "redis": {
                    "host": "***REMOVED SENSITIVE VALUE***",
                    "port": 6379
    },

Try commenting apcu out

sudo sed -i 's/ext/;ext/' /etc/php/7.4/apache/conf.d/20-apcu

sudo systemctl reload apache2

Hello @Vincent_Stans , thanks for the contribution, then doing that procedure I get this error which tells me that this is not the solution. Any other ideas regarding this error.

[PHP] Error: PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/20190902/apc.so (/usr/lib/php/20190902/apc.so: undefined symbol: zif_apcu_store), /usr/lib/php/20190902/apc.so.so (/usr/lib/php/20190902/apc.so.so: cannot open shared object file: No such file or directory)) at Unknown#0

You should find in your php.ini file and your dir /etc/php/7.x//conf.d/.ini for a duplicate of the loading module.

It is hard to tell you where it is loaded twice. You should search for a php solution as it is not a nextcloud issue.

ok, anyway thanks a lot for the help

hello again, it turns out that reviewing the history of the commands executed in the console I filtered which could be apcu. To my surprise I had already enabled apcu some time ago but not exactly in the default file but in a new file that I named cache.ini which I did not check. The problem was quickly resolved upon realizing the error. Greetings and thanks again.

Dear, please guide
i am unable to find mine
here is my gerp for apc

/etc/php/7.4/cli/conf.d/20-apcu.ini,
/etc/php/7.4/cli/conf.d/25-apcu_bc.ini
apc
apcu
apc.coredump_unmap => Off => Off
apc.enable_cli => On => On
apc.enabled => On => On
apc.entries_hint => 4096 => 4096
apc.gc_ttl => 3600 => 3600
apc.mmap_file_mask => no value => no value
apc.preload_path => no value => no value
apc.serializer => php => php
apc.shm_segments => 1 => 1
apc.shm_size => 32M => 32M
apc.slam_defense => Off => Off
apc.smart => 0 => 0
apc.ttl => 0 => 0
apc.use_request_time => Off => Off

hi friend, check that you don’t have a file called cache.ini, there was the additional configuration repeated in my case