简体   繁体   中英

Install AMQP in windows 10 & PHP 7.3

i want to install AMQP in windows 10 with PHP 7.3 for use in symfony 4. windows not use any apache/iis/nginx and run directly by symfony.

everything ok! until, i decide to use rabbitmq in project and need amqp for it.

So, 1. download AMQP 1.9.4 (php 7.3 compatible)
2. copy php_amqp.dll to c:\php
3. copy rabbitmq.4.dll (AMQP 1.9.4 compatible) to c:\windows\system32
4. add extension=php_amqp.dll > php.ini
5. php.ini extension_dir = "ext"

but i get this error:

PHP Warning:
PHP Startup: Unable to load dynamic library 'php_amqp.dll'
(tried: ext\php_amqp.dll (The specified module could not be found.),
ext\php_php_amqp.dll.dll (The specified module could not be found.)) in Unknown on line 0

i try these instruction:
1. change php.ini extension_dir to "C:\php\ext\"
2. install openssl 1.1
3. copy libeay32.dll,ssleay32.dll into "c:\windows\system32"
4. restart, restart, restart, ...

how can i solve this problem?

Try:

  • copying php_amqp.dll and php_amqp.pdb into \php\ext\
  • copying rabbitmq.4.dll and rabbitmq.4.pdb into \php\

It didn't work for me with PHP 7.2.13RC1, but it works with PHP 7.2.17

I'm using Windows 10, x64, PHP non thread safe

1) generate phpinfo file, check - Architecture ie: x86 - PHP Extension Build ie: API20170718,TS,VC15 - Thread Safety ie: enabled

2) go to https://pecl.php.net/package/amqp find version of library acording to your PHP ver, and thread safe or not thread safe

like here: https://pecl.php.net/package/amqp/1.9.4/windows

3) unzip/tar package copy php_amqp.dll into ext dir in php dir (ie: c:/xammp/php/ext)

4) edit php.ini add "extension=php_amqp.dll"

copy rabbitmq.4.dll and rabbitmq.4.pdb into ie: c:/xammp/php

5) install Win32OpenSSL (save dlls in windows/system dir)

https://slproweb.com/products/Win32OpenSSL.html

  1. Be shure you download compatible version php and amqp libriary (thread-save or no9t-thread-safe, x86 or x64).

For example:

links to all versions for windows:

AMQP https://pecl.php.net/package/amqp/1.9.4/windows

PHP https://windows.php.net/download/

  1. You need to register dll regsvr32 c:\windows\system32\rabbitmq.4.dll (or copy rabbitmq.4.dll to c:\php\ dir)

and move php_amqp.dll to extension dir move c:\php\php_amqp.dll c:\php\ext\

I had same problem to install amqp with XAMPP(if that is a case) Make sure you downloaded Thread-safe version for amqp Rest of configuration is showed above

  1. Add php_amqp.dll in xampp/php/ext
  2. Add rabbit.dll windows/system32
  3. in php.ini add extension=php_amqp.dll

That's it.

copy rabbitmq.4.dll to php/ directory. That saved my life with php 8.1.4. First moved it to php/ext and doesn't work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM