Home >Backend Development >PHP Tutorial >How to install yaf extension on Ubuntu php example

How to install yaf extension on Ubuntu php example

jacklove
jackloveOriginal
2018-06-28 17:57:061891browse

The editor below will share with you an article on how to install the yaf extension on Ubuntu. It has a good reference value and I hope it will be helpful to everyone. Let’s follow the editor to take a look

1. Download

yaf extension download address

http://pecl .php.net/package/yaf

Select the package you want to download

wget http://pecl.PHP.net/get/yaf-2.3.5.tgz
tar zxvf yaf-2.3.5.tgz
cd yaf-2.3.5

##2. Installation

##
#whereis phpize
/data/yaf-2.3.5# /usr/bin/phpize
#whereis php-config
php-config: /usr/bin/php-config /usr/share/man/man1/php-config.1.gz
/data/yaf-2.3.5# ./configure --with-php-config=/usr/bin/php-config
/data/yaf-2.3.5# make && make install

##Solution:

An error may occur during the last command: compilation terminated. make: * [yaf_router.lo] Error 1

sudo apt-get install libpcre3 libpcre3-dev openssl libssl-dev

Execute the last command again.

If everything goes well, it should look like this:

也可以执行以下make test

There may be errors like this :cp:cannot create regular file '/usr/lib/php5/20121212/#INST@13121#':Permission denied

This is insufficient permission. The current user is not root. You can switch to root through su and enter Just root password. If you forget your password, you can reset it: sudo passwd root

Add in php.ini:

extension=yaf.so

If you don’t know php Where is the .ini, you can look at phpinfo

##Finally, restart the server

The above article installs the yaf extension on Ubuntu The method is all the content shared by the editor. I hope it can give you a reference, and I also hope that everyone will support the php Chinese website.

Related recommendations:

thinkphp3.2.0 setInc method source code comprehensive analysis of PHP examples

##PHP Redis message queue to achieve high concurrency PHP example of downloading registration number statistics

PHP PHP example of using binary to save user status


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

Statement:
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