Giter Site home page Giter Site logo

Comments (13)

mkoppanen avatar mkoppanen commented on July 30, 2024

I'll try to get FreeBSD virtual machine running and see if I can reproduce the issue.

from php-zmq.

wagonza avatar wagonza commented on July 30, 2024

if you want I can give you remote access to a machine?

from php-zmq.

sullrich avatar sullrich commented on July 30, 2024

I also can give access to a virtual machine. Just let me know. Thanks for taking a look at this mkoppanen!

from php-zmq.

mkoppanen avatar mkoppanen commented on July 30, 2024

Hi,

thanks for the offer but thats not needed. Already got FreeBSD VM running.

from php-zmq.

sullrich avatar sullrich commented on July 30, 2024

Just a few other items about the setup: we are using /usr/ports/lang/php52 (php 5.2). /usr/ports/www/pecl-APC/ is installed as well. Other than that its a stock 8.1 FreeBSD box with SMP enabled (2 processors).

from php-zmq.

sullrich avatar sullrich commented on July 30, 2024

It appears to block in zmq_init on php_zmq_context_new_function of zmq.c

from php-zmq.

mkoppanen avatar mkoppanen commented on July 30, 2024

Further down the line it seems to be blocking on pthread_create.

from php-zmq.

mkoppanen avatar mkoppanen commented on July 30, 2024

Hello,

I think I solved this after a lot of debugging. I had to choose "Link against libthr for threaded extensions" during make config for the PHP port.

from php-zmq.

mkoppanen avatar mkoppanen commented on July 30, 2024

make test after linking PHP with libthr:

TIME START 2010-08-17 20:53:30
PASS Test send / recv [tests/001-send.phpt]
PASS Test send / recv binary [tests/002-test-binary.phpt]
PASS Test getting persistent id [tests/003-getpersistentid.phpt]
PASS Test getting endpoints [tests/004-getendpoints.phpt]
PASS Test getsockopt / setsockopt [tests/006-sockopt.phpt]
PASS Test adding / removing items [tests/007-addremovepoll.phpt]
PASS Test constructing a socket [tests/008-twowaystoconstruct.phpt]
PASS Test ispersistent on context and socket [tests/009-ispersistent.phpt]
PASS Test invalid args for ZMQPoll [tests/010-pollsetinvalidargs.phpt]
PASS Test exceptions [tests/011-exceptions.phpt]
PASS Test remove invalid id from ZMQPoll [tests/012-pollsetremoveinvalid.phpt]
PASS Test clearing and reusing ZMQPoll [tests/013-pollclearandreuse.phpt]
TIME END 2010-08-17 20:53:39

from php-zmq.

wagonza avatar wagonza commented on July 30, 2024

Ok I can confirm on my side that if I link PHP5.2.13 with libthr it works:

[root@fbsd8-32 ~]# ldd php-cgi
php-cgi:
libcrypt.so.5 => /lib/libcrypt.so.5 (0x28291000)
librt.so.1 => /usr/lib/librt.so.1 (0x282aa000)
libm.so.5 => /lib/libm.so.5 (0x282af000)
libxml2.so.5 => /usr/local/lib/libxml2.so.5 (0x282c9000)
libz.so.5 => /lib/libz.so.5 (0x283f3000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28405000)
libthr.so.3 => /lib/libthr.so.3 (0x284fb000)
libc.so.7 => /lib/libc.so.7 (0x28510000)

Then firing up simple-server.php it does run and starts to listen:

[root@fbsd8-32 ~]# ./php-cgi simple-server.php &
[1] 93343
[root@fbsd8-32 ~]# sockstat -4 -p 5555
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
root php-cgi 93343 13 tcp4 127.0.0.1:5555 :

And executing client.php does return a responce:

[root@fbsd8-32 ~]# ./php-cgi client.php
Content-type: text/html

Got message: hello there!
Content-type: text/html

string(12) "hello there!"
[root@fbsd8-32 ~]#

So it appears to be working for me, but lets wait to hear what Scott says.
Thanks for the help mkoppanen.

from php-zmq.

mkoppanen avatar mkoppanen commented on July 30, 2024

Added note to here as well: http://www.zeromq.org/bindings:php#toc3

from php-zmq.

sullrich avatar sullrich commented on July 30, 2024

It works great now, thank you very much mkoppanen!

from php-zmq.

sullrich avatar sullrich commented on July 30, 2024

Closing ticket

from php-zmq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.