- 1 year ago
Install AMQP in windows 10 & PHP 7.3
To install AMQP (Advanced Message Queuing Protocol) for PHP 7.3 on Windows 10, you'll need to follow these steps:
Download the AMQP extension DLL:
- Go to the PECL website: https://pecl.php.net/package/amqp
- Download the appropriate AMQP extension DLL for PHP 7.3 and your system architecture (x86 or x64).
- Extract the downloaded DLL to a location of your choice.
Configure PHP to load the AMQP extension:
- Open your PHP configuration file (php.ini) in a text editor.
- Add the following line to the php.ini file to load the AMQP extension:
Replacebashextension=path/to/amqp.dll
path/to/amqp.dll
with the full path to the AMQP extension DLL you downloaded in step 1.
Restart your web server:
- If you are using Apache, restart the Apache server.
- If you are using PHP's built-in web server, stop and restart the server.
Verify that AMQP is enabled:
- Create a PHP file (e.g., info.php) containing the following code:php
<?php
phpinfo();
?>
- Place the file in your web server's document root.
- Open a web browser and navigate to
http://localhost/info.php
(replacelocalhost
with your server's hostname or IP address). - Search for "amqp" in the phpinfo page to see if the AMQP extension is enabled.
- Create a PHP file (e.g., info.php) containing the following code:
Note: The AMQP extension requires the RabbitMQ C library (librabbitmq.dll) to be available on your system. You can download the appropriate DLL from the official RabbitMQ website (https://github.com/rabbitmq/rabbitmq-c/releases) and place it in the same directory as the AMQP extension DLL.
Please make sure to download the correct version of the AMQP extension that matches your PHP version and system architecture (x86 or x64). If you encounter any issues during the installation process, refer to the PHP documentation or the AMQP extension documentation for troubleshooting.