首页 > 代码库 > Mac php安装第三方扩展trie_filter

Mac php安装第三方扩展trie_filter

 

php安装不要带enable-debug brew install php56 --with-fpm;

trie_filter从git上面下载的,链接https://github.com/wulijun/php-ext-trie-filter

下载php源代码,进入源代码的ext目录执行./ext_skel --extname==trie_filter

cd trie_filter

 

 cp /Users/mini/Downloads/php-ext-trie-filter-master/config.m4 /Users/mini/Downloads/php-ext-trie-filter-master/php_trie_filter.h /Users/mini/Downloads/php-ext-trie-filter-master/trie_filter.c /Users/mini/Downloads/php-ext-trie-filter-master/triefilter.php ./

phpize(有时候报错是因为没有安装autoconf m4相关的依赖)$ ./configure --with-php-config=$INSTALL_PHP_PATH/bin/php-config 

$ make
$ make install
然后修改php.ini,增加一行:extension=安装目录/trie_filter.so,然后重启PHP。

Mac php安装第三方扩展trie_filter