php_redis.dll not working in windows
Asked Answered
R

9

12

I tried both the files from here: https://github.com/nicolasff/phpredis/downloads. I am using 64bit wampserver on windows 7 professional. It looks like apache is trying to load the file but somehow could not recognize it properly. This is what I see in the error log:

PHP Startup: Unable to load dynamic library 'D:/wamp/bin/php/php5.3.13/ext/php_redis.dll' - %1 is not a valid Win32 application.

Anyone faced similar issues? Do we have a working solution for this?

Rainout answered 10/6, 2012 at 16:34 Comment(7)
put the value of extension_dir in your php.ini. it should be something like C:\xampp\php\extPonderable
@ZiTAL I tried both the DLLs. Do you have a link for working dll?Rainout
i wish this will be useful for you #2001575Uird
I am not looking for a php library like predis. I wanted to have the extension working - specially for speed and session.save_path=redis.Rainout
Is the path, D:/wamp/bin/php/php5.3.13/ext/php_redis.dll, proper? I wonder whether the forward slashes should be back slashes () instead, but if this is in line with how it's laid out in Apache's .conf file then this may be irrelevant.Appetizing
Location is not a problem - as apache can find out the file - its just not recognizing it as valid application.Rainout
is this relative?Disruption
F
5

Just in case it can help someone, I managed to solve the error on PHP 7.1.12 installing the 32 bits DLL.

I was getting the error:

Warning: PHP Startup: Unable to load dynamic library '.../php_redis.dll'
not a valid Win32 application

But after installing the 32 bits version, the warning disappeared.

To know which architecture of XAMPP/WAMP are you using, visit the phpinfo() and look for the value "Architecture", it was for me on the fourth row, and as expected is had the value x86.

Fuegian answered 22/9, 2018 at 11:45 Comment(0)
M
5

I had to check the Server API from phpinfo() to decide which version to use

If It's Apache 2.0 Handler(mod_php) go with Thread Safe version

If It's CGI go with Non Thread Safe version

Mealie answered 4/12, 2018 at 0:25 Comment(0)
A
2

Unfortunately I do not run 64-bit version of PHP to test this, but for PHP 5.3 you can try this dll.

Dll from https://github.com/nicolasff/phpredis/downloads ( php_redis-2.1.3-5.2-vc6-ts-4350b2a.zip ), is working fine with PHP 5.2.17 (32-bit version).

I hope you will solve the problem.

Antigen answered 16/6, 2012 at 0:12 Comment(0)
S
1

I used XAMPP x86 / PHP 7.2.5 so I needed redis x86 and the directory is this: C:/xampp/php/ext/.

https://pecl.php.net/package/redis/4.1.0/windows

Squawk answered 11/2, 2019 at 10:55 Comment(0)
P
0

I'll add my ansewer to the table :

I used those dlls for my AMPPS server (WAMP should be the same) under windows 8 with PHP 5.5: https://pecl.php.net/package/redis/2.2.7/windows

following this tutorial

https://www.linkedin.com/pulse/using-redis-windows-php-shekhar-joshi

Pentane answered 11/9, 2015 at 11:40 Comment(0)
A
0

I had same issue for 64 bit windows 7 wampserver with PHP5.5.12 and worked for me from below link dll binaries of Redis

http://windows.php.net/downloads/pecl/releases/redis/2.2.7/

Avellaneda answered 25/5, 2016 at 7:37 Comment(0)
B
0

I had the same case, I was installing wamp 32bit, but I imported the library in 64bit however I had to imorted the 32bit version.

Check in the task manager which version of wamp you are using!

Bergschrund answered 20/12, 2016 at 12:48 Comment(0)
M
0

For me the reason was version of Redis PHP extension that I've been used.

  • xampp architecture: x64
  • php version: 7.4
  • php type: ts (thread safe)
  • redis version installed on windows: 3.0.504

and finally the version of Redis PHP extension that worked for me was:

  • for php 7.4
  • latest stable version: php_redis-5.3.4-7.4-ts-vc15-x64 I downloaded it from this Link
Moonset answered 15/12, 2021 at 11:59 Comment(0)
S
0

From php info, get your php extension build, then choose accordingly the php_redis package to be downloaded

Php info

Sealey answered 3/10, 2023 at 5:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.