Installation of Php+xapian extension

Source: Internet
Author: User

What the hell is Xapian ?

Xapian is a "Xapian" is an open source probabilistic information retrieval library, based on the GPL release. It is written in C + + and provides bindings that support other languages (Perl, Python, PHP, Java, and TCL) development. Xapian is designed to be a highly adaptable toolset that allows developers to easily add advanced indexing and search capabilities to their own applications. ”

Find this section on the Internet, I itch to try xapian--must give PHP the whole thing up. After referencing several documents, this starts to work (my environment is still FreeBSD + Apache 2.2 + PHP 5.1.2, Apache and PHP are already installed):

1. Download Xapian

Cd/usr/local/src

wget http://www.oligarchy.co.uk/xapian/0.9.4/xapian-core-0.9.4.tar.gz wget http://www.oligarchy.co.uk/xapian/ 0.9.4/xapian-bindings-0.9.4.tar.gz

The former is Xapian's core Lib code, which is the interface to other languages

2. Install Xapian-core

Cd/usr/local/src

Tar xzvf xapian-core-0.9.4.tar.gz cd xapian-core-0.9.4./configure–prefix=/usr/local/xapian make make Install

3. Install Xapian-bindings

Cd/usr/local/src

Tar xzvf xapian-bindings-0.9.4.tar.gz cd xapian-bindings-0.9.4 ln-s/usr/local/xapian/bin/xapian-config/usr/local/ Bin/xapian-config #这里需要做个软连接, you need to use the./configure–without-python #我没用到python when compiling, do not compile make made install

In this step, xapian-bindings should be installed, but do not know why, the compiled xapian.so not according to the description of the document is automatically copied to the PHP extension directory, so I manually completed this step

CP php/.libs/xapian.so/usr/local/lib/php #/usr/local/lib/php is the extension directory I set up in php.ini

Then modify the php.ini

Extension_dir = "/usr/local/lib/php/" #没有就加上 extension=xapian.so

Install all completed, restart Apache to see phpinfo:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.