I am not able to make apc work with High Sierra and PHP 7.1.14. I have done everything.
Below is the output for php -i | grep apc
PHP Warning: Method apc_store() cannot be a NULL function in Unknown
on line 0
PHP Warning: apc: Unable to register functions, unable to load in
Unknown on line 0
Warning: Method apc_store() cannot be a NULL function in Unknown on
line 0
Warning: apc: Unable to register functions, unable to load in Unknown
on line 0
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 => 64M => 64M
apc.slam_defense => On => On
apc.smart => 0 => 0
apc.ttl => 7200 => 7200
apc.use_request_time => On => On
apc.writable => /tmp => /tmp
And output of phpinfo() also shows apcu is enabled.
But when I run my application, below error gets printed:
[Fri May 25 18:43:30.523133 2018] [php7:error] [pid 1693] [client
10.146.5.127:54542] PHP Fatal error: Uncaught Error: Call to undefined
function apc_store()
This is the code snippet which adds data into the apc_store:
public static function add(LoggedInUser $loggedInUser) {
if (!is_null($loggedInUser) && !is_null($loggedInUser->getUserData()) &&
!is_null($loggedInUser->getUserData()->userId)) {
apc_store($loggedInUser->getUserData()->userId, $loggedInUser, 60);
}
}