Search code examples
phpredispecl

Why is the Redis extension not working with PHP 8.2?


I am using the latest stable version of PHP 8.2.4 with XAMPP on Windows 11 x64. I want to install the Redis extension in the PHP ext folder. However, after installing the DLL file and registering it in the php.ini file, the Redis installation still does not appear on the phpinfo page. Additionally, it throws a warning on the command line while running php -v. In PECL site the latest supported PHP version is 8.1. Does it mean that currently there is no way to use redis with PHP 8.2.4?

I need help on how to install Redis in Xampp having PHP 8.2.4.

First of all, I downloaded the DLL file for both TS and NTS from the PECL for x64 which is compatible with my machine. Although the latest version they provide is for PHP 8.1, not PHP 8.2.

enter image description here

Then I added the DLL file from the source file to the php/ext folder.

enter image description here

Then I registered this DLL file into the php.ini config file.

enter image description here

Then I checked the installation through the phpinfo(). but there was no section of Redis. Additionally, when I run php -v in CLI, it gives a warning as follows.

enter image description here

Note: I have tried both Thread safe and Non Thread safe DLL for this matter. Both are not working.


Solution

  • Check out this article: https://stackoverflow.com/a/76496489/15166658.

    It appears that there is a Redis DLL available for PHP 8.2:

    php_redis.dll

    Furthermore, it has been reported to work well with PHP 8.2.1 and Redis 3.2.100 on Windows 11.

    UPDATE:

    download link: https://github.com/phpredis/phpredis/actions/runs/4930167168#artifacts

    UPDATE:

    phpinfo output

    test with simple code: execute in simple code