Yes, that is the error I was getting. Take a look at the code < https://bitbucket.org/osmanov/pecl-event/src/74adb2980f6da7c70a00b801aa8e4865ac2f3acc/src/util.c?at=master#cl-64> and you can see it's because PHP_EVENT_SOCKETS_SUPPORT is not defined. This goes back to my original question; I think it's maybe because the extension isn't getting compiled in a full PHP development environment:
> >I was able to download and compile the events module < http://pecl.php.net/package/event/1.7.5> without any >errors, but when I try using it in a certain way, I get an error. Digging through the code (I know just enough to >know that I'm in over my head) I found the problem is here in common.h < https://bitbucket.org/osmanov/pecl-<https://bitbucket.org/osmanov/pecl-event/src/74adb2980f6da7c70a00b801aa8e4865ac2f3acc/src/common.h#cl-37> >event/src/74adb2980f6da7c70a00b801aa8e4865ac2f3acc/src/common.h#cl-37<https://bitbucket.org/osmanov/pecl-event/src/74adb2980f6da7c70a00b801aa8e4865ac2f3acc/src/common.h#cl-37> >: > >#if PHP_VERSION_ID >= 50301 && (HAVE_SOCKETS || defined(COMPILE_DL_SOCKETS)) ># include <ext/sockets/php_sockets.h> ># define PHP_EVENT_SOCKETS_SUPPORT >#endif > >HAVE_SOCKETS and COMPILE_DL_SOCKETS are both undefined. Is this a part of the standard PHP install that's >missing? > Michael Newton http://mike.eire.ca/ On Thu, Aug 29, 2013 at 5:33 PM, Ryan Schmidt <[email protected]>wrote: > > On Aug 28, 2013, at 22:39, Michael Newton wrote: > > > Thanks for the quick response. I tried installing the php54-pear port > but I'm not sure what it does. The pear-PEAR port installs some PEAR > packages, but doesn't install the "pear" and "pecl" commands used to manage > them. > > Ok, that may be intended. Really, we don't want users using pear(1) or > pecl(1) to install software into MacPorts; we want users to use MacPorts to > install that software. And if ports for the software you want don't exist > yet, then they should be created. > > I've created the port for php-event: > > https://trac.macports.org/changeset/110328 > > To get it, wait 30 minutes, then run: > > sudo port selfupdate > sudo port install php54-event > > > > Sample code is based on example 3 at > http://www.php.net/manual/en/event.examples.php > > > > http://pastebin.com/bUkMWdzB > > I ran your code and got this message: > > > $ php54 event.php > PHP Warning: EventListener::__construct(): valid PHP stream resource > expected in /private/tmp/event.php on line 42 > > Warning: EventListener::__construct(): valid PHP stream resource expected > in /private/tmp/event.php on line 42 > PHP Fatal error: Call to a member function setErrorCallback() on a > non-object in /private/tmp/event.php on line 43 > > Fatal error: Call to a member function setErrorCallback() on a non-object > in /private/tmp/event.php on line 43 > > > Is this what you got also? I do not know if this is normal. You would have > to ask the PHP people. > > >
_______________________________________________ macports-users mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-users
