Install Php- Brotli Extension on PHP-FPM

Started by bikker, June 09, 2020, 07:23:01 PM

Previous topic - Next topic

bikker

Hi i am trying to install php brotli extension https://github.com/kjdev/php-ext-brotli 
it shows up sucessfull in my php
php --ri brotli

brotli

Brotli support => enabled
Extension Version => 0.8.0
Library Version => 1.0.7

but its not working in PHP-FPM module.
the php info for php-fpm does not shows the brotli module
the normal php 7.3 does show the brotli , how can i get it working for php-fpm

Thank YOu

Sandeep

not recommended to install why you need it in php ?

Automata

#2
Quote from: Sandeep on June 12, 2020, 07:12:17 AM
not recommended to install why you need it in php ?

Hi "Sandeep", i have the same problem.

For my WordPress website i use the plugin W3 Total Cache which requires the use of PHP function brotli_compress and one of their developers also explains the reason:

(https://wordpress.org/support/topic/module-detection-problem-with-fpm/)

"Hello,

We check for the PHP function brotli_compress, because that function is used to compress cache files and store a compressed version of the cache, same as we do for gzip compression. If we would not do this, the server has to dynamically compress files when requested, which takes some time. That would defeat the purpose of using compression to speed up the website.

If you want to use the Apache module only, which I do not recommend, you can always add the required code manually to your .htaccess file outside of the W3TC blocks."

Please "Sandeep" how to install php-ext-brotli (https://github.com/kjdev/php-ext-brotli) for PHP-FPM on CWP PRO ?

Thanks in advance for the support.


« Stay hungry, stay foolish. »