Home  >  Article  >  Backend Development  >  Install yaf framework under ubuntu

Install yaf framework under ubuntu

WBOY
WBOYOriginal
2016-08-08 09:19:001360browse

Reference
http://yaf.laruence.com/manual/yaf.install.html
First, find the installation directory of php, execute info.php, check the php path

Configuration File (php.ini) Path 	/etc/php5/apache2 

Then find the address of phpize,
whereis phpize

Then cd to the decompression directory of yaf and execute
/usr/bin/phpize

If it is not in the decompression directory of yaf and there is no .m4 file, an error will be reported
Cannot find config.m4.

  Make sure that you run /usr/local/bin/phpize in the top level source directory of the module

and then execute

 ./configure --with-php-c/bin/php-config

Please note that pcre must be installed first. If not, an error will be reported
pcre.h: No such file or directory

Install pcre
sudo apt-get install libpcre3-dev

and then execute
make


Finally execute. If you do not add sudo, there may be permission issues. Because you need to create a folder
sudo make install

Final tip:
Installing shared extensions: /usr/lib/php5/20121212/
Then load yaf.so in php.ini, restart PHP.
vi /ext/php5/apache2/php.ini

You can directly '/extension_dir' after vi 'Search, it may look like this after finding it:
extension_dir = ./"
needs to be modified to:
extension_dir ="/usr/lib/php5/20121212/" (note that it is the location of the so file)
extension=yaf.so
Finally save and exit! :wq!
Restart
service apache2 restart
or
sudo /etc/init.d/apache2 restart

After restarting, open info.php again and you will see
yaf support	Yaf logo enabled
Version 	2.3.3
Supports 	http://pecl.php.net/package/yaf 

The above introduces the installation of the yaf framework under ubuntu, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

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