php install event extension

php中世界最好的语言
Release: 2023-03-22 07:42:01
Original
4793 people have browsed it

This time I will bring you phpInstallationevent extension, what are the precautions for installing event extension in php, the following is a practical case, let's take a look.

Extensions to schedule I/O efficiently, time and signal Events using the best I/O notification mechanism available for a specific platform, is a libevent port of PHP infrastructure.

Download address: http://pecl.php.net/package/event

To install the support library libevent, you need to compile a higher version (the latest version release-2.1.8-stable is used here) Example)

wget -c https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz -P /usr/local/src
cd /usr/local/src
tar -zxvf libevent-2.1.8-stable.tar.gz && cd libevent-2.1.8-stable
./configure --prefix=/usr/local/libevent-2.1.8
make && make install
Copy after login

Install the event library (take event-2.3.0.tgz as an example)

wget -c http://pecl.php.net/get/event-2.3.0.tgz -P /usr/local/src
cd /usr/local/src
tar -zxvf event-2.3.0.tgz && cd event-2.3.0
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-event-libevent-dir=/usr/local/libevent-2.1.8/
make && make install
Copy after login

Add the following configuration in php.ini

extension=event.so
Copy after login

After restarting php-fpm, use php -m | grep event to check whether the event library plug-in is installed successfully

I believe you have mastered the method after reading the case in this article. For more exciting content, please pay attention to other related articles on the php Chinese website!

Recommended reading:

How to use the PHP generator.

phpStudy2018 installation tutorial

The above is the detailed content of php install event extension. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template