[rabbitmq-discuss] PHP Client libraries

diez flatline at stresstiming.de
Wed Feb 10 11:25:05 GMT 2010


Hi Alex!

So module  works now so far. But there is the next Problem :)

If I follow this Example my code stops and does not return

<?php

$cnn = new AMQPConnect (array ('port'=>5672, 'login' => 
'live_rabbit','password'=>'lostpassword','vhost'=>'/testhost' ));
$exchange = new AMQPExchange($cnn);

$queue = new AMQPQueue($cnn);
$queue->declare('me', AMQP_AUTEDELETE | AMQP_DURABLE);
print "new Exchange".PHP_EOL;
$exchange->declare('ex_name','topic');
print "declare Exchange".PHP_EOL;
$exchange->bind('me','beta.*');
print "bind Exchange".PHP_EOL;
$msg = "Hello World";
$res = $exchange->publish( $msg, 'beta.me');


#########

>  php rabbit.php
new Exchange
declare Exchange

###########

It never reaches the bind Exchange line. I attached the log of my 
RabbitMQ Server

Logfile RabbitMQ

###########

=INFO REPORT==== 10-Feb-2010::12:19:42 ===
accepted TCP connection on 0.0.0.0:5672 from 127.0.0.1:44776

=INFO REPORT==== 10-Feb-2010::12:19:42 ===
starting TCP connection<0.8351.0>  from 127.0.0.1:44776

########## after pressing ctrl-c within the shell with the running rabbit.php testscript. #############


=WARNING REPORT==== 10-Feb-2010::12:19:48 ===
exception on TCP connection<0.8351.0>  from 127.0.0.1:44776
connection_closed_abruptly

=INFO REPORT==== 10-Feb-2010::12:19:48 ===
closing TCP connection<0.8351.0>  from 127.0.0.1:44776


#############



>    
>> Hey ho,
>>
>> After doing this :
>>
>> /update/rabbit# phpize5&&  ./configure --with-rabbit&&  make&&  make install
>> /update/rabbit# ldconfig
>>
>> I get:
>>
>> PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library)
>> 'rabbit.so'  in Unknown on line 0
>> Exception: Extension rabbit does not exist
>>
>>
>> I used Alex's trunk from subversion and I have ubuntu with php 5.2.6
>> without any special options!
>>
>> Ideas?
>>      
> I will stady, why cannot compile module.
>
> Can are You comlipe PHP static ?
> ./configure --with-rabbit ....
>
>
> Alexandre
>    



Am 10.02.2010 11:35, schrieb Alexandre Kalendarev:
>    
>> http://code.google.com/p/php-rabbit/source/browse/trunk/rabbit.c#154
>> Change
>> #ifdef COMPILE_DL_AMQP
>> to
>> #ifdef COMPILE_DL_RABBIT
>> AJ
>>
>>      
>   fix in svn
>
> Alexandre
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100210/d1986357/attachment.htm 


More information about the rabbitmq-discuss mailing list