How to setup opcache with php-fpm73
-
Would anyone kindly provide a good tutorial for this please. I have search but could not get a guide
Cheers.
-
@legend php-fpm installs with opcahe by default did you checked phpinfo for the checks ?
-
@sandeep I checked and its there but I am not get any hits when I check the php info in cwp under php-fpm selector.
-
@legend can you provide some screen shots ?
*** use imgur to upload photos : https://imgur.com/ -
@sandeep
in /opt/alt/php-fpm73/usr/php/php.d/opcache.ini :zend_extension=/opt/alt/php-fpm73/usr/lib/php/extensions/no-debug-non-zts-20180731/opcache.so opcache.enable=1 opcache.enable_cli=1 opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=39406 opcache.revalidate_freq=60 opcache.fast_shutdown=1
in /home/user/public_html/.user.ini under user cwp:
zend_extension=/opt/alt/php-fpm73/usr/lib/php/extensions/no-debug-non-zts-20180731/opcache.so opcache.enable=1 opcache.enable_cli=1 opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=39406 opcache.revalidate_freq=60 opcache.fast_shutdown=1 opcache.save_comments=1
in php-fpm info:
Zend OPcache Opcode Caching => Up and Running Optimization => Enabled SHM Cache => Enabled File Cache => Disabled Startup => OK Shared memory model => mmap Cache hits => 0 Cache misses => 0 Used memory => 11528248 Free memory => 122689480 Wasted memory => 0 Interned Strings Used memory => 461896 Interned Strings Free memory => 5829136 Cached scripts => 0 Cached keys => 0 Max keys => 65407 OOM restarts => 0 Hash keys restarts => 0 Manual restarts => 0 Directive => Local Value => Master Value opcache.blacklist_filename => no value => no value opcache.consistency_checks => 0 => 0 opcache.dups_fix => Off => Off opcache.enable => On => On opcache.enable_cli => On => On opcache.enable_file_override => Off => Off opcache.error_log => no value => no value opcache.file_cache => no value => no value opcache.file_cache_consistency_checks => On => On opcache.file_cache_only => Off => Off opcache.file_update_protection => 2 => 2 opcache.force_restart_timeout => 180 => 180 opcache.huge_code_pages => Off => Off opcache.interned_strings_buffer => 8 => 8 opcache.lockfile_path => /tmp => /tmp opcache.log_verbosity_level => 1 => 1 opcache.max_accelerated_files => 39406 => 39406 opcache.max_file_size => 0 => 0 opcache.max_wasted_percentage => 5 => 5 opcache.memory_consumption => 128 => 128 opcache.opt_debug_level => 0 => 0 opcache.optimization_level => 0x7FFEBFFF => 0x7FFEBFFF opcache.preferred_memory_model => no value => no value opcache.protect_memory => Off => Off opcache.restrict_api => no value => no value opcache.revalidate_freq => 60 => 60 opcache.revalidate_path => Off => Off opcache.save_comments => On => On opcache.use_cwd => On => On opcache.validate_permission => Off => Off opcache.validate_root => Off => Off opcache.validate_timestamps => On => On
-
@legend said in How to setup opcache with php-fpm73:
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=39406
opcache.revalidate_freq=60
opcache.fast_shutdown=1CWP doesn't have this configs you should go deep with this configs added or remove them to use default.
-
@sandeep also ensure that account is using php 7.3 fpm via phpinfo.
-
@sandeep yes i did
-
@sandeep sorry. how do i do that
-
@legend after enabling opcache did you opened any php scripts ?
-
@sandeep no.
any test script will be helpful.
-
@legend use wordpress
-
@sandeep thanks
-
Hello,
I am trying the same for opcache for nextcloud.
What exactly have I to do in php settings please? -
@changlee you need to have pro license and php-fpm installed