CWP - memcache, memcached and redis, redis cluster
-
I have memcached running on my server. But phpinfo.info shows that only memcahe is installed.
php -i | grep memcach gives:
memcache memcache support => enabled memcache.allow_failover => 1 => 1 memcache.chunk_size => 32768 => 32768 memcache.compress_threshold => 20000 => 20000 memcache.default_port => 11211 => 11211 memcache.hash_function => crc32 => crc32 memcache.hash_strategy => consistent => consistent memcache.lock_timeout => 15 => 15 memcache.max_failover_attempts => 20 => 20 memcache.prefix_host_key => Off => Off memcache.prefix_host_key_remove_subdomain => Off => Off memcache.prefix_host_key_remove_www => On => On memcache.prefix_static_key => no value => no value memcache.protocol => ascii => ascii memcache.redundancy => 1 => 1 memcache.session_prefix_host_key => Off => Off memcache.session_prefix_host_key_remove_subdomain => Off => Off memcache.session_prefix_host_key_remove_www => On => On memcache.session_prefix_static_key => no value => no value memcache.session_redundancy => 2 => 2 memcache.session_save_path => no value => no value memcached memcached support => enabled libmemcached version => 1.0.18 memcached.compression_factor => 1.3 => 1.3 memcached.compression_threshold => 2000 => 2000 memcached.compression_type => fastlz => fastlz memcached.default_binary_protocol => Off => Off memcached.default_connect_timeout => 0 => 0 memcached.default_consistent_hash => Off => Off memcached.serializer => php => php memcached.sess_binary_protocol => On => On memcached.sess_connect_timeout => 0 => 0 memcached.sess_consistent_hash => On => On memcached.sess_consistent_hash_type => ketama => ketama memcached.sess_lock_expire => 0 => 0 memcached.sess_lock_max_wait => not set => not set memcached.sess_lock_retries => 5 => 5 memcached.sess_lock_wait => not set => not set memcached.sess_lock_wait_max => 150 => 150 memcached.sess_lock_wait_min => 150 => 150 memcached.sess_locking => On => On memcached.sess_number_of_replicas => 0 => 0 memcached.sess_persistent => Off => Off memcached.sess_prefix => memc.sess.key. => memc.sess.key. memcached.sess_randomize_replica_read => Off => Off memcached.sess_remove_failed_servers => Off => Off memcached.sess_sasl_password => no value => no value memcached.sess_sasl_username => no value => no value memcached.sess_server_failure_limit => 0 => 0 memcached.store_retry_count => 2 => 2 Registered save handlers => files user memcached memcache redis rediscluster
-
I want to understand what the above means.
-
what is the meaning of this: Registered save handlers => files user memcached memcache redis rediscluster
-
How do i setup memcached as php session handler. I have not see a guide that will help.
-
-
@legend said in CWP - memcache, memcached and redis, redis cluster:
chunk
you can find some info here
https://github.com/websupport-sk/pecl-memcache/blob/NON_BLOCKING_IO_php8/README -
@sandeep Thanks for this excellent support.
As from the above, i installed memcached, mecache directly from the cwp. Should I remove them and follow the this https://github.com/websupport-sk/pecl-memcache/blob/NON_BLOCKING_IO_php8/README for php7.3 or php-fpm73?
-
@legend installation is same for cwp too you don;t need to to uninstall anything.
-
@sandeep Thanks. Do you have a tutorial on using memcached as a php session handler or this occur by default after mecached installtion?
-
@legend memcached is installed as php extension and only can be used when you configured memcached with your site's script. If your site doesn't support it then I'm afraid you can't use it anyway.
there is one tutorial for WP in the blog.
-
@sandeep my site supports it. its for magento and whmcs.
i want php to save to seesions to memcached and to files as the default. redis is good as php handler but it has issues with whmcs.
For magento, redis will handle session and page cache while varnish is for full page cache.
-
@legend in php.ini
you can define/add it :session.save_handler = memcached session.save_path = "localhost:11211"
-
@sandeep thanks