skip to Main Content

I am experiencing difficulties starting Redis 5.3.7 with PHP 8.2 on my Windows machine. When I attempt to start it, a dialog box displays with the message:

"The procedure entry point _zend_get_parameters_array_ex could not be located in the dynamic link library c:Program Filesphpextphp_redis.dll"

I have included a screenshot of the error below:

error screenshot

2

Answers


  1. Chosen as BEST ANSWER

    Here the way I solve the problem

    go to this page https://github.com/phpredis/phpredis/actions/runs/4930167168#artifacts, extensions are listed there.

    working for me on xampp, php8.2.1 and redis 3.2.100 on windows 11


  2. How to compile a PHP extension like Redis, under Windows. Since nobody really explains that.

    Run commands under the old Windows shell, e.g. cmd.exe

    You will need the 2019 version of the Microsoft C/C++ compiler, so the linker is compatible with the downloadable PHP for Windows. winget can found as "App Installer" in the Windows Store.

    winget install --id Microsoft.VisualStudio.2022.BuildTools
    

    In the Visual Studio Build Tools 2022 ‘modify’ the install under the ‘Individual components’ tab, and select:

    • C++/CLI support for v142 build tools (14.29-16.11)
    • MSVC v142 – VS 2019 C++ x64/x86 build tools

    Download PHP for Windows, also download and unzip the ‘Development package (SDK to develop PHP extensions)’ and probable also the ‘Debug Pack’. In the ‘Development package’ there is a folder, you need to unzip the contents of that folder to the folder where you have php.exe. https://windows.php.net/download#php-8.2

    Git clone https://github.com/phpredis/phpredis inside the folder where you have php.exe.

    winget install --id Git.Git
    git clone https://github.com/phpredis/phpredis.git
    # or:
    winget install --id Git.Git
    winget install --id GitHub.cli
    gh repo clone phpredis/phpredis
    

    In a command shell cmd.exe inside the directory where you have php.exe.

    "C:Program Files (x86)Microsoft Visual Studio2022BuildToolsVCAuxiliaryBuildvcvars64.bat" -vcvars_ver=14.29
    
    .configure.bat --enable-redis
    

    In the Makefile fix PHP_SRC_DIR to point to phpredis, e.g. PHP_SRC_DIR ="C:laragonbinphpphp-8.2.7-Win32-vs16-x64phpredis"
    Also fix the PHP_PREFIX to point to PHP, e.g. PHP_PREFIX="C:laragonbinphpphp-8.2.7-Win32-vs16-x64"

    nmake
    copy x64Release_TSphp_redis.dll ..ext
    

    In the php.ini:

    extension=php_redis.dll
    

    Then run php -m to see redis listed.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search