I am trying to install php-redis via pecl.
Running this:
php -i | grep API
gives this: PHP API => 20220829
I then run pecl install redis
and I get the message:
...
running: phpize
Configuring for:
PHP Api Version: 20220829
Zend Module Api No: 20220829
Zend Extension Api No: 420220829
...
Build process completed successfully
Installing '/usr/lib/php/20230831/redis.so'
install ok: channel://pecl.php.net/redis-6.0.2
Extension redis enabled in php.ini
As you can see, there is a mismatch between the apis.
When I inspect php with php -i | grep redis
, I get this error message:
PHP Warning: PHP Startup: redis: Unable to initialize module
Module compiled with module API=20230831
PHP compiled with module API=20220829
These options need to match
in Unknown on line 0
I am on php8.2, so api 20220829 is correct.
My question is, how can I install redis for api 20220829 to match my php version.