I have already seen this question . This suggests that the AMQP PECL extension is not installed. However, I have successfully installed both RabbitMQ and built the PECL AMQP extension. Below is the output of phpinfo ().

You can clearly see AMQP 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 conclusion.
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 could this happen? Any suggestions? Thanks.
source share