[zeromq-dev] PHP - Trying to receive data from external program

Master Boyer master.boyer at livetkd.com
Tue Jan 27 20:11:40 CET 2015

Hi Folks,

Having a little trouble getting started.
I've download the Windows Install ... added the .dll's to the 2 php 
folders, included the extension= in the php.ini
phpinfo() ... shows that ZMQ is running

I cannot download any examples from:
http://php.zero.mq <http://php.zero.mq/>

I finally tracked down some stuff on github:

For a Client/Server test, I've downloaded the:

(both files missing the ending tags for php ?>  )

anyways ... running a command-line window for each...
I was able to get this example to work...

so whats the problem?

I have an external program (otherProgram.exe)
that sends data back via TCP sockets ...
using PHP socket_read .... I can get data
but using ZMQ:

$context = new ZMQContext(1);
//  Socket to talk to clients
$responder = new ZMQSocket($context, ZMQ::SOCKET_REP);
while(true) {
//  Wait for next request from client
     $request = $responder->recv();
     printf ("Received request: [%s]\n", $request);

I get no response.

The external program is set to the same PORT #: 6325, as ZMQ

What options if any can I change to make something like this work?

- Master Boyer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150127/d1065663/attachment.htm>

More information about the zeromq-dev mailing list