note 117542 added to event.examples

From: Date: Fri, 26 Jun 2015 09:17:34 +0000
Subject: note 117542 added to event.examples
Groups: php.notes 
Request: Send a blank email to php-notes+get-202960@lists.php.net to get a copy of this message
In order to use certain features used in the examples above here you need a very recent version of libevent (>= 2.1). Although 'pecl install event' will not show any errors, certain features are disabled and certain function calls might use a different number of parameters. For example EventHttp will throw a warning that the number of parameters should be 1 instead of 2 (when using it with a SSL context) and as a bonus cause a segmentation fault. On some distributions of Linux, the stable libevent library might not be recent enough for all features to be enabled and you might need to use an alpha version. You can install an alpha version of libevent next to the stable version that might already be on your machine. The basic steps are: - download the alpha tarball to a folder e.g libevent-2.1.3-alpha.tar.gz - tar zxvf libevent-2.1.3-alpha.tar.gz - cd libevent-2.1.3-alpha - ./configure --prefix=/opt/libevent-alpha - make - make install Now the alpha version of libevent is created in /opt/libevent-alpha. Before running pecl, first export the library folder of libevent so that pecl knows where your most recent libevent stuff is: export LD_LIBRARY_PATH=/opt/libevent-2.1.3-alpha/lib Without this export I couldn't get pecl to use the correct libevent Now run 'pecl install event' and when asked libevent installation prefix [/usr] : enter : /opt/libevent-2.1.3-alpha Now pecl will use your alpha version of libevent instead of the default version. If everything goes well then you should be able to enjoy the full glory of this wonderfull extension. If you try to install a very recent version of libevent on a system with a old version of openssl (0.9), you also need to update that because there are some dependencies in libevent that do not work with 0.9 ---- Server IP: 72.52.91.14 Probable Submitter: 124.39.122.119 ---- Manual Page -- http://php.net/manual/en/event.examples.php Edit -- https://master.php.net/note/edit/117542 Del: integrated -- https://master.php.net/note/delete/117542/integrated Del: useless -- https://master.php.net/note/delete/117542/useless Del: bad code -- https://master.php.net/note/delete/117542/bad+code Del: spam -- https://master.php.net/note/delete/117542/spam Del: non-english -- https://master.php.net/note/delete/117542/non-english Del: in docs -- https://master.php.net/note/delete/117542/in+docs Del: other reasons-- https://master.php.net/note/delete/117542 Reject -- https://master.php.net/note/reject/117542 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#202960) next »