0

I'm looking to install Brotli php extension on my Windows Server 2022 server as it offer ~15% better compression performance than Gzip. But I really can't find a proper way to install it. Any suggestion ?

I did install Brotli on my IIS server already.

Now, I need to install the PHP extension to make my Wordpress cache plugin work properly as it asks for it.

I tried to find a DLL which I did at SourceForge but my PHP doesn't recognize it:

`PHP Warning: PHP Startup: Unable to load dynamic library 'brotli' (tried: C:\php\ext\brotli (The specified module could not be found), C:\php\ext\php_brotli.dll (The specified module could not be found)) in Unknown on line 0`[PHP Modules]". 

The file is there and the folder has all the permissions. I changed the php.ini extension directory to the full path but it changes nothing.

I also tried to install it through PECL but I have the following error :

downloading brotli-0.15.0.tgz ... Starting to download brotli-0.15.0.tgz (468,436 bytes) ..............................................................................................done: 468,436 bytes 95 source files, building ERROR: The DSP brotli.dsp does not exist. 
6
  • I think you want github.com/kjdev/php-ext-brotli Commented Apr 18, 2024 at 23:49
  • Which version of PHP are you running? Did you well downloaded the x64 version from Sourceforge? Commented Apr 19, 2024 at 5:43
  • Can you post the extensions bloc from your php.ini so we can make sure your syntax is right? Commented Apr 19, 2024 at 7:13
  • @b126 Sorry for the very late answer. The problem is still at the exact same point. So here is my php.ini:extension=curl extension=brotli ;extension=ffi ;extension=ftp ;extension=fileinfo extension=gd ;extension=gettext ;extension=gmp ;extension=intl ;extension=imap etc Commented Jul 3, 2024 at 23:24
  • I just tried one more time now. I downloaded the /v1.1.0/brotli-x64-windows-static.zip version at Source Forge. Exctracted it. Copy pasted the three dll in php/ext. (php 8.3.4). Added extension=brotlicommon.dll extension=brotlidec.dll extension=brotlienc.dll to php.ini extensions. But nothing is dedicated to Brotli when I do a phpinfo(); Not sure if I'm doing it the proper way.. Commented Jul 3, 2024 at 23:55

1 Answer 1

1

https://pecl.php.net/package/brotli/0.16.0/windows

Download DLL according to your PHP version.

Add extension=brotli and an empty [brotli] section in your php.ini to enable it.

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.