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

5
  • Silly Question But did you install REDIS? The PHP Extension is not REDIS its just a connector to REDIS
    – RiggsFolly
    May 28, 2020 at 12:29
  • Yes, did install Redis.
    – tsd
    May 28, 2020 at 20:42
  • Did you download the Thread Safe dll from PECL?
    – RiggsFolly
    May 28, 2020 at 20:54
  • And did you also check the X64(64bit) or X86(32bit) that matches the WAMPServer 32 0r 64bit you are using??
    – RiggsFolly
    May 28, 2020 at 20:56
  • Yes, downloaded TS dll file. Yes, both are x64, so that should not be an issue.
    – tsd
    May 29, 2020 at 9:30

1 Answer 1

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().

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.