emcache

agasar

Verified User
Joined
May 16, 2021
Messages
67
Hello

[Wed Aug 17 04:42:44.261300 2022] [lsapi:error] [pid 3840725:tid 140700083504896] [client 88.226.105.133:23456] [host www.XXX.com] Backend fatal error: PHP Fatal error: Uncaught RuntimeException: Memcache cache module is not available. in Fatal error: Uncaught RuntimeException: Memcache cache module is not available. in /home/XXX/domains/XXX/public_html/library/Cube/Cache/Adapter/Memcache.php:67\nStack trace:\n#0 /home/XXX/domains/xx.com/public_html/library/Cube/Cache.php(53): Cube\\Cache\\Adapter\\Memcache->__construct(Array)\n#1 /home/XXX/domains/xx.com/public_html/library/Cube/Cache.php(67): Cube\\Cache->__construct(Array)\n#2 /home/XXX.com/domains/xx.com/public_html/library/Cube/Application/Resource/Cache.php(46): Cube\\Cache::getInstance(Array)\n#3 /home/XXX/domains/XXX.com/public_html/library/Cube/Application/Bootstrap.php(169): Cube\\Application\\Resource\\Cache->init()\n#4 /home/XXX/domains/XXX.com/public_html/library/Cube/Application/Bootstrap.php(211): Cube\\Application\\Bootstrap->_bootstrap('cache')\n#5 /home/XXX/domains/XXX.com/public_html/library/Cube/Application.php(242): Cube\\Application\\Bootstrap->bootstrap()\n#6 /home/XXX/domains/xx.com/public_html/i in /home/xx/domains/XXX.com/public_html/library/Cube/Cache/Adapter/Memcache.php on line 67\n


I am getting the above error, I have moved the site from another server. I am getting the above error. Has anyone had such errors before.
"Memcache" has been installed. And I still couldn't get the site to work.
 
Hello,

There are two possible modules for PHP: memcache and memcached. Please do not mix them.

Check phpinfo() to make sure memcache module is installed and loaded correctly.
 
Hello

Installed by "cloudlinux" and working fine "memcache" problem still persists.

Does anyone have any other suggestions what should I do? We still can't solve the problem
 
The error "Memcache cache module is not available" says what is says.

Do you see the Memcache cache module available in phpinfo() output on that particular domain? Not on DirectAdmin page, but in phpinfo().
 
Is it installed correctly

php -i | grep -i memcache
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 => 0 => 0
memcache.prefix_host_key_remove_subdomain => 0 => 0
memcache.prefix_host_key_remove_www => 1 => 1
memcache.prefix_static_key => no value => no value
memcache.protocol => ascii => ascii
memcache.redundancy => 1 => 1
memcache.session_prefix_host_key => 0 => 0
memcache.session_prefix_host_key_remove_subdomain => 0 => 0
memcache.session_prefix_host_key_remove_www => 1 => 1
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 memcache memcached
 
And you executed the command php -i as the user for which you check? Not as admin, or root?
And the user has the module enabled in the settings for the active PHP version?

If your server uses cageFS then the user can use either native PHP version or a PHP version offered by CloudLinux. And in order to check php -i in a console you should switch to the effective user and test it.

If your server does not use cageFS then DirectAdmin PHP switcher will have a precedence, and a PHP version installed by DirectAdmin will be used. And the extension will need to be installed manually.

I don't have all the details, so the only thing is left to guess what you have there and how you check the things. And for now I might suspect not everything is checked good enough.

So the best would be to upload a PHP file under public_html of the user and test:

PHP:
<?php
phpinfo();
 
"cloudlinux." They did exactly what you told them to do. Still not resolved problem "cloudlinux." They say it's not related. problem persists
 
"cloudlinux." Here is the new reply from

I can only say that the alt-php extension memcached is set correctly. memcached is not a CloudLinux product and we do not provide support for it.

So far, all indications are that your problem is not related to CloudLinux. If you can provide information that links your problem to CloudLinux components, please provide it, it would be just as useful to us.
 
And still would I suggest that you upload a PHP file under public_html of the user and test its results in a browser:

PHP:
<?php
phpinfo();

It might happen the extension is not loaded into the needed PHP version. And your results in CLI are valid only for the main PHP version installed by DirectAdmin.
 
The result is as in the picture below
 

Attachments

  • mem1.png
    mem1.png
    31.9 KB · Views: 233
  • mem2.png
    mem2.png
    24.6 KB · Views: 149
  • mem3.png
    mem3.png
    25.7 KB · Views: 143
OK, if everything is checked correctly and the user has the correct PHP version with Memcache, then I'm out of ideas.

If your DirectAdmin license allows it, you might request directadmin support to check it for you.

Or probably other users have other ideas.
 
Back
Top