I've already seen this question. It suggests that AMQP PECL extension is not installed. However, I have successfully installed both RabbitMQ as well as built PECL AMQP extension. The following is the output of the phpinfo().
You can clearly see, AMQP is loaded correctly. However, when I try to establish a connection, it says PHP Fatal error: Class 'AMQPConnection' not found. Below is the code.
$connection = new AMQPConnection();
And here is the output.
user@ubuntu:~$ php repos/default/test.php
PHP Fatal error: Class 'AMQPConnection' not found in /home/user/repos/default/test.php on line 5
Why this might happen? Any suggestions? Thank you.
The problem is most likely that the CLI installation uses a different php.ini file than the web/Apache module and you need to add the extension to the CLI php.ini file as well. Where exactly that is depends on your platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With