php-ext-brotli
php-ext-brotli copied to clipboard
PHP Startup: brotli: Unable to initialize module
Hi there,
I installed php-ext-brotli on PHP 7.2 and I got this error when I run php -v
on ubuntu 18.04
PHP Warning: PHP Startup: brotli: Unable to initialize module
Module compiled with module API=20180731
PHP compiled with module API=20170718
These options need to match
in Unknown on line 0
PHP 7.2.16-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 7 2019 20:23:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.16-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
The module (brotli.so) I built is different from the PHP version.
- PHP 7.2: PHP API => 20170718
- PHP 7.3: PHP API => 20180731
Install the module you built with PHP 7.2.
Well, that's the issue... I only have PHP 7.2 installed, not 7.3. Why does it then, compile with PHP 7.3?
I upgraded PHP to 7.3 and it now works fine. No luck with PHP 7.2 only, although steup was working a few months ago on a similar setup.