colinmollenhour / Cm_Cache_Backend_Redis

A Zend_Cache backend for Redis with full support for tags (works great with Magento)
Other
389 stars 142 forks source link

lzf compression not found #85

Closed sander010587 closed 9 years ago

sander010587 commented 9 years ago

Hello,

Colin thank you for the extension. I have installed the Cm_Cache_Backend_Redis and Cm_RedisSession extension using modman. Everything is working fine if I use gzip as compression, but when I use lzf I get the following php error: PHP Fatal error: Call to undefined function lzf_decompress() in /var/www/emega-dev/app/code/community/Cm/Cache/Backend/Redis.php on line 879

I installed lzf using the PECL installation as suggested in your documentation. Also added this rule to the php.ini file: extension=lzf.so

In my php info I see the following "Registered Stream Filters": zlib., bzip2., convert.iconv._, string.rot13, string.toupper, string.tolower, string.striptags, convert., consumed, dechunk, lzf.compress, lzf.decompress, mcrypt., mdecrypt.

Anything I am doing wrong to correctly make use of the lzf compression method?

Thanks in advance.

edit: Magento 1.7.0.2 Ubuntu 14.04 PHP 5.5.9 (FPM) Redis 2.8.4

Kind regards, Sander.

colinmollenhour commented 9 years ago

Looks like you did everything right. Perhaps check to make sure that the lzf extension is active for both cli and fpm since Ubuntu uses different php.ini files for each (/etc/php5/cli and /etc/php5/fpm I think)

sander010587 commented 9 years ago

Dear Colin,

Thank you for the quick response. You are correct with regard to the issue I was perceiving. Our webserver is using php5-fpm which ran correctly. Because I was reindexing from the command line using php /shell/indexer.php it used php-cli which was not correctly configured to use lzf and therefore gave me the error.

Thank you for your help!

Kind regards, Sander

hashid commented 9 years ago

I had the same problem. Now CLI is working, but I get the following warning

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/lzf.ini' - /usr/lib/php5/20121212/lzf.ini: cannot open shared object file: No such file or directory in Unknown on line 0

sander010587 commented 9 years ago

Hello Hashid,

Do you have your files in this directory?