• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved Install lz4 for phpredis

nookyyy

New Pleskian
Server operating system version
Debian 11.6
Plesk version and microupdate number
18.0.50
Hey,

as pecl does not support lz4 yet (at least i couldnt find it) i wonder if theres a way to add this extension manually to plesks php handlers (8.x) so i can use it with phpredis

cheers
 
Thanks for your feedback - and how can i get phpredis to be compiled with lz4 support afterwards ? same process i assume ? But i have to uninstall it first with pecl ?
 
Thanks for your feedback - and how can i get phpredis to be compiled with lz4 support afterwards ? same process i assume ? But i have to uninstall it first with pecl ?
Already found my answer - for anyone with the same problem:
1. Install lz4 - GitHub - kjdev/php-ext-lz4: LZ4 Extension for PHP

Bash:
# git clone --recursive --depth=1 https://github.com/kjdev/php-ext-lz4.git
# cd php-ext-lz4
# phpize
# ./configure
# make
# make install

2. Install liblz4 - Package liblz4-dev

Bash:
# sudo apt-get update
# sudo apt-get install liblz4-dev

3. Install phpredis - phpredis/phpredis
Bash:
# git clone https://github.com/phpredis/phpredis.git
# cd phpredis
# phpize
# ./configure [--enable-redis-igbinary] [--enable-redis-msgpack] [--enable-redis-lzf [--with-liblzf[=DIR]]] [--enable-redis-zstd]
# make && make install

FOR ./configure i used --enable-redis-igbinary --enable-redis-zstd --enable-redis-lz4 --with-liblz4

4. Copy / move the .so files to the plesk modules dir - Location ( in this case for php8.2 ):
/opt/plesk/php/8.2/lib/php/modules

5. Add the extensions to php.ini ( in this case for php8.2 )

Bash:
# echo "extension=redis.so" > /opt/plesk/php/8.2/etc/php.d/redis.ini
# echo "extension=lz4.so" > /opt/plesk/php/8.2/etc/php.d/lz4.ini

6. Refresh the information about PHP handlers in Plesk

Bash:
# plesk bin php_handler --reread
~ "The information about PHP handlers was successfully updated."
# service plesk-php82-fpm restart
# service nginx restart
# service apache2 restart

7. Refresh the information about server components in Plesk

Bash:
# plesk sbin packagemng -sdf

et voila
 
Back
Top