4

I have done the following steps to enable php_redis extension on my wampserver X64. Thread Safety was enabled.

  1. Downloaded the Zip File from https://pecl.php.net/package/redis/5.2.2/windows this link.

  2. Extract the zip file, copied php_redis.dll in wamp64\bin\php\php7.3.12\ext\ directory.

  3. Added extension=php_redis.dll in php.ini file.

  4. Re-started the wamp Server.

Still I couldn't find redis on phpinfo().

When I check redis extension from WampServer tray icon, it showed me the following error:

The 'php_redis.dll' extension file exists but there is no 'extension=php_redis.dll' line in php.ini.

What am I missing here?

Php Version= 7.3.12, Windows 10 x64.

Update

I have re-installedwamp server, C++ redistributables and followed the same steps to enable php_redis extension. Now the previous error disappeared.

However, when I tried to use Redis on my code, it still shows error!

This time, I am getting the following error from my php error log:

[05-Jun-2020 12:45:17 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'redis' (tried: c:/wamp64/bin/php/php7.3.12/ext/redis (The specified module could not be found.), c:/wamp64/bin/php/php7.3.12/ext/php_redis.dll (The specified procedure could not be found.)) in Unknown on line 0

tsd
  • 41
  • 1
  • 3

1 Answers1

7

Please follow below steps carefully.

Step 1. Print phpinfo()

Step 2. Check PHP version (e.g. PHP Version 7.4.0) and visit https://pecl.php.net/package/redis site and according to your PHP version, select the package. e.g. For PHP 7.4, https://pecl.php.net/package/redis/5.2.2/windows

Step 3. In phpinfo(), search 'Thread Safety' check whether it's enabled or disabled. If enabled you need to download Thread Safe (TS). Otherwise, download Non Thread Safe (NTS)

Step 4. Now extract the zip and get php_redis.dll and paste it to php extension folder in Wamp Server(wamp64\bin\php\php7.x.x\ext\)

Step 5. Add the extension=php_redis.dll in your php.ini (By clicking on Wamp->PHP->php.ini)

Step 6. Restart the WAMP server and serch redis in phpinfo().

Ravi Hirani
  • 6,511
  • 1
  • 27
  • 42