1

I have project with plain php and in some part have $memcache = new Memcache; I debug and when beginning this line have fatal error - app die I check in my php info I have

memcached

memcached    support    enabled
             Version    2.2.0
libmemcached version    1.0.18

I check

ivan@ivan-PC:/usr/local/bin$ ps aux | grep memcached
ivan      2857  0.0  0.0  22804   960 pts/27   S+   13:44   0:00 grep --color=auto memcached
memcache 24913  0.0  0.0 325536  2160 ?        Ssl  11:55   0:00 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1

in log

Class 'Memcache' not found

in console I run memcache, but still app die. what need to do check ?

4
  • Sorry, I am a bit confused. "app dies", what app? Does PHP crash? Do you get any error logs? Is the only thing that causes the crashing is when you add that single line? Commented Jan 10, 2017 at 11:44
  • Class 'Memcache' not found Commented Jan 10, 2017 at 11:46
  • Thanks for the edit! Is the PHP extension for memcache installed and loaded? Just having memcache system daemon doesn't give the ability to use new Memcache;. There are a lot of questions regarding that error message, do you get any resolution when searching on them? eg stackoverflow.com/q/2659035 Commented Jan 10, 2017 at 12:09
  • I solved this problem when sudo pecl install pecl_http-2.5.5 because need php version 5.6 and then in php info I find memcache and memcached Commented Jan 10, 2017 at 13:41

1 Answer 1

2

Memcache and Memcached are two different libraries.

Your php info says you have installed memcached. Error says you are using memcache.

Try installing memcache and you should be fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.