APCu syntax error

Hey, how are you today?

I am encountering a problem with APCu configurations.

I added into /etc/php/7.4/cli/conf.d/20-apcu.ini the below configs and i get a syntax error. PHP: syntax error, unexpected ‘=’ in /etc/php/7.4/cli/conf.d/20-apcu.ini on line 4 everytime i run occ commands. Any idea why this could happen and how to fix it?

Also, even though my config is apc.shm_size=128M when i use php -i | grep apc.shm_size it shows apc.shm_size => 32M => 32M.

apc.shm_segments=1 # default = 1
apc.shm_size=128M # default = 30
apc.ttl=7200 # default = 0
apc.user_ttl=7200 # default = 0
apc.num_files_hint=1024 # default = 1000
#apc.mmap_file_mask=/tmp/apc.XXXXXX # default = no value
apc.enable_cli=1 # default = 0

Thank you!!

apc.shm_segments=1 # default = 1

Maybe there is a problem with the comments # . Can you delete them.
Then hopefully you get an error in line 5.
If yes delete all comments.

This last line is double. You can delete it.


You were right! The problem were the comments. I deleted them and it works fine now. Thank you very much!

1 Like