[zeromq-dev] PHP Error on Ubuntu
lanre lawal
lawillas4ever at yahoo.com
Wed Oct 12 01:24:19 CEST 2011
Hello Ali,
Well for what iḿ
trying to achieve I really don´t need to send any messages, All i need
to do is receive the messages so am thinking maybe the send() part would have to go off. The documentation site is currently down so I can´t
access the documentation. Is there a soft copy of the documentation that I can get from somewhere else. Maybe you can help me from your
experience. I´ll explain what I actually want to achieve.
There´s a dedicated IP address that is currently receiving messages from some
devices, now I want to connect to this address and receive these
messages. Thats just what I want to do. Can you give me steps on how to
do this or better still send me a soft copy of the documentation.
Regards,
Olanrewaju Lawal
Web Developer / Programmer
+2348053568948
________________________________
From: Amr Ali <amr.ali.cc at gmail.com>
To: lanre lawal <lawillas4ever at yahoo.com>; ZeroMQ development list <zeromq-dev at lists.zeromq.org>
Sent: Tuesday, October 11, 2011 11:48 PM
Subject: Re: [zeromq-dev] PHP Error on Ubuntu
I'm not familiar with the PHP client library but this error basically says that
the send() operation has not been completed, and since this is a REQ socket, you
cannot recv() before you send().
I'd make sure that send() was successful first (lookup documentation to see how
to check on that) and you should do the same for recv() as well.
On 10/12/2011 12:24 AM, lanre lawal wrote:
> So guys haven been frustrated by the windows build process, i decided to install
> Ubuntu on my work station and as you all rightly noted, the installation process
> for ZMQ was pretty straight forward. However the extension has been loaded
> correctly and appears in the phpinfo() page. Now i tried to run a test code to
> connect to a remote address that is currently sending some messages so that I
> could receive the messages but i got this error in my code. I¨m using the PHP
> binding. Below is my code and the error i got.
>
> CODE
> <?php
> $queue = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REQ, "Sock1");
> $queue->connect("tcp://24.187.208.22:2060");
> var_dump($queue->send("Hello there!")->recv());
> ?>
>
> ERROR
> Fatal error: Uncaught exception 'ZMQSocketException' with message 'Failed to
> receive message: Operation cannot be accomplished in current state' in
> /home/lax/www/liverycompass/index.php:4 Stack trace: #0
> /home/lax/www/liverycompass/index.php(4): ZMQSocket->recv() #1 {main} thrown in
> /home/lax/www/liverycompass/index.php on line 4
>
> Please what could be the problem. Thanks guys for your help so far
>
> Regards,
> Olanrewaju Lawal
> Web Developer / Programmer
> +2348053568948
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111011/e3bea497/attachment.htm>
More information about the zeromq-dev
mailing list