您好,登錄后才能下訂單哦!
如何在PHP7項目中安裝event擴展?很多新手對此不是很清楚,為了幫助大家解決這個難題,下面小編將為大家詳細講解,有這方面需求的人可以來學習下,希望你能有所收獲。
安裝 Libevent 庫
php event 擴展 依賴 Libevent 庫,需要先編譯安裝(注意是 Libevent 庫,非 libevent 擴展)。
git clone --depth=1 https://github.com/nmathewson/Libevent.git cd Libevent ./autogen.sh ./configure --prefix=/usr/local/libevent make && make install
安裝 Event 擴展
可以直接使用 pecl 安裝
pecl install event downloading event-2.5.3.tgz ... Starting to download event-2.5.3.tgz (140,913 bytes) ..............................done: 140,913 bytes 50 source files, building running: phpize Configuring for: PHP Api Version: 20180731 Zend Module Api No: 20180731 Zend Extension Api No: 320180731 Enable internal debugging in Event [no] : Enable sockets support in Event [yes] : libevent installation prefix [/usr] : /usr/local/libevent ... Build process completed successfully Installing '/usr/local/php/lib/php/extensions/no-debug-non-zts-20180731/event.so' install ok: channel://pecl.php.net/event-2.5.3 Extension event enabled in php.ini
查看安裝結果
[root@localhost ~]# php --ri event event Event support => enabled Sockets support => enabled Debug support => disabled Extra functionality support including HTTP, DNS, and RPC => enabled OpenSSL support => enabled Thread safety support => disabled Extension version => 2.5.3 libevent2 headers version => 2.2.0-alpha-dev
看完上述內容是否對您有幫助呢?如果還想對相關知識有進一步的了解或閱讀更多相關文章,請關注億速云行業資訊頻道,感謝您對億速云的支持。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。