Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php_redis.dll not working in windows

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?

like image 441
Vikash Avatar asked Jun 10 '12 16:06

Vikash


4 Answers

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.

like image 136
Eloy Ruiz Avatar answered Oct 24 '22 04:10

Eloy Ruiz


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

like image 44
Rain Avatar answered Oct 24 '22 04:10

Rain


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.

like image 2
Alexandru Guzinschi Avatar answered Oct 24 '22 03:10

Alexandru Guzinschi


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

like image 1
Militaru Avatar answered Oct 24 '22 02:10

Militaru