Before you read:
- PHP not loading extensions does not answer my question because I do not have Apache. I have IIS.
- MySQL extension of PHP not working does not answer my question because the files have the same permissions as all other DLL files and have not broken inheritance.
- PHP on IIS doesn't load sqlsrv extension does not answer my question because the item is for the latest version.
I currently have a PHP script which simply adds Redis (using PhpRedis).
<?php
$redis = new Redis ();
?>
This creates a "500 Internal Server Error" message. Upon inspecting PHP 7.4 x64's logs, despite being located here, loading the page triggers the error:
[06-Aug-2021 15:54:13 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'php_redis.dll' (tried: C:\Program Files\PHP\v7.4\ext\php_redis.dll (The specified module could not be found.), C:\Program Files\PHP\v7.4\ext\php_php_redis.dll.dll (The specified module could not be found.)) in Unknown on line 0
It is not searching in the wrong place or not added because of these entries in php.ini
:
[WebPIChanges]
extension_dir="C:\Program Files\PHP\v7.4\ext\"
...
[ExtensionList]
extension=php_redis.dll
...
IIS can detect the redis plugin in the extension manager and states that it is enabled.
This issue occurs in v7.4. I have tried this in v8.0, and I still face the same issues. PhpRedis 5.3.4 provides a v7.4 DLL, still the same issue with no dependencies made aware of.
Best Answer
Issue resolved. My compiled version of PHP did not support thread safety features, therefore I must either compile a version with thread safety or use the NTS version of PhpRedis.