tags:

views:

23

answers:

0

I'm getting the following error when running the code listed below. I have install AMQP extension through PECL and it shows up fine in my php.ini file when I do phpinfo both from the command line and browser.

    <?php
    // amqp rabbitmq client test


    // Create a connection
    $cnn = new AMQPConnection();
    exit();
?>

When trying to run that code I get this error:

dyld: lazy symbol binding failed: Symbol not found: _amqp_new_connection
  Referenced from: /opt/local/lib/php/extensions/no-debug-non-zts-20090626/amqp.so
  Expected in: flat namespace

dyld: Symbol not found: _amqp_new_connection
  Referenced from: /opt/local/lib/php/extensions/no-debug-non-zts-20090626/amqp.so
  Expected in: flat namespace

These are the install instructions I followed:

Download rabbitmq-c lib from: http://hg.rabbitmq.com/rabbitmq-c/ (.zip file)

Download codegen http://hg.rabbitmq.com/rabbitmq-codegen/summary (.zip file)


unzip rabbitmq-c

unzip codegen and put it into the rabbitmq-c lib and rename it codegen

cd into rabbitmq-c dir

autoreconf -i && ./configure && make && sudo make install


#install the amqp extension
sudo pecl install -f amqp