How Do You Fix a Error when Running PHP Too?

Problem scenario
You get an error about memcache and you are running PHP. Or you get an error "Unable to load dynamic library ""? You run "php --version" and you see an error about memcache or memcached (e.g., a missing file). What should you do?

Possible Solution #1
Get a file from a working Linux server and place it in the directory that the error message showed in the php --version command. If the OS is the exact same as a working server, you could try the location mentioned in the error message. Alternatively you could run this to find it: sudo find / -name

Possible Solution #2
You could run this (where "/path/to/pecl" is the result of this command "which pecl"):

sudo /path/to/pecl install memcached

Possible Solution #3
Check the permissions of the file if it exists. The file may have incorrect permissions that keep it from being usable.

Possible Solution #4
Is the file corrupt or too small? There may be a problem with it. You may need to recreate it. You may want to back it up before you recreate it just to be sure.

Possible Solution #5
If you are using brew, see this posting:

For future reference:
To find the version of memcached installed, try these commands:

rpm -qi libmemcached
yum list installed | grep memcache
which memcached
memcached -h

Leave a comment

Your email address will not be published. Required fields are marked *