Install AMQP in windows 10 & PHP 7.3

放肆的年华 提交于 2019-12-11 06:19:48

问题


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?


回答1:


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




回答2:


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

For example:

  • php 7.3.8 ts x64 link https://windows.php.net/downloads/releases/php-7.3.8-Win32-VC15-x64.zip
  • amqp 1.9.4 ts x64 for 7.3 link https://windows.php.net/downloads/pecl/releases/amqp/1.9.4/php_amqp-1.9.4-7.3-ts-vc15-x64.zip

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\



来源:https://stackoverflow.com/questions/54967199/install-amqp-in-windows-10-php-7-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!