1
votes

I get error

Fatal error: Uncaught Error: Call to undefined function apc_clear_cache()

Could you please tell me how to fix this issue? I have this version of php

PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )

although phpinfo displays:

apcu

    APCu Support    Enabled
    Version 5.1.3
    APCu Debugging  Disabled
    MMAP Support    Enabled
    MMAP File Mask  no value
    Serialization Support   php
    Build Date  Apr 5 2016 02:16:47
    Directive   Local Value Master Value
    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    On  On
    apc.smart   0   0
    apc.ttl 0   0
    apc.use_request_time    On  On
    apc.writable    /tmp    /tmp
4
format error and information blocks. - Shawn Mehan

4 Answers

1
votes

It looks like I solved issue, installing from other rep, like this one.

apt-get remove php-apcu
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php-apcu
1
votes

I use php7.0 and package maintainers provide php7.0-apcu-bc - backward compatibility package translating apc_* calls to apcu_*.

1
votes

When PHP 7 was first released, APC cache was not compatible. Now there is a package for it.

apt-get install php7.0 php-apcu
0
votes

APCu differs from APC in the sense that it's APC stripped of opcode caching. It's only key-value data store part.

You have APCu module enabled so you can call apcu_* functions accordingly:

apcu_clear_cache();