Check out the Latest Articles:
Sphinx as a PHP module integrated

Sphinx to generate a PHP module is important to be able to access the Sphinx PHP API methods.

How it's done:

tar-xzvf sphinx-0.9.8.1.tar.gz
sphinx-0.9.8.1/api/libsphinxclient cd /
. / Configure & & make install

After that PECL can be used to build the PHP module:

pecl install sphinx-beta

In version 0.9.9 there were at least for me an error when compiling.

The Sphinx forum there is a tip to:

Here are the commands I used to install and before this I libsphinxclient successful
installed sphinx:
cd / path / to / sphinx / src / api / libsphinxclient /
sudo sh / path / to / sphinx / src / api / libsphinxclient / .buildconf.sh
sudo. / configure
sudo make
sudo make install

But when I used "sudo make" I got this error:
sphinxclient.c: 1216: error: static declaration of 'sock_close' follows non-static
declaration
sphinxclient.c: 280: note: previous declaration of 'sock_close' was here

So I checked the file.

On line: 280

 sock_close void (int sock);

On line: 1216

 static void sock_close (int sock)
 {
 # If _WIN32
 closesocket (sock);
 # Else
 close (sock);
 # Endif
 }

I changed the line 280 to:

 static void sock_close (int sock);

This has eliminated the problem for me. Now you simply have to create the module with PECL under etc/php5/apache2/php.ini
The following entry shall be inserted:

[Sphinx]
extension = sphinx.so

That's it. After restarting the Apache server can now use the PHP API for Sphinx.
phpinfo () after the installation should have this entry:

sphinx
sphinx support enabled
Version 1.0.3
Revision $ Revision: $ 292,826

Who wants to use in addition to the PHP API also Sphinxs (ie the Sphinx engine for MySQL), which was this article to heart.

If when compiling sphinx on Ubuntu 9.10 (Karmic), the following error message appears:
"Check that you do have MySQL include files installed. The package name is typically 'mysql-devel' "

The following should solve the problem:
apt-get install libmysql + +-dev

Under sorgalla.com also describes how Sphinxs can be integrated with the Zend Framework. Good thing!

Enhanced by Zemanta


  1. Searching with wildcards and only in defined areas with Sphinx ... | uzed?

    [...] It is a very nice installation instructions can be found at the semantic blog and [...]



Blog directory - blog directory bloggerei.de Blog directory Blog and ping Blog Top List - by TopBlogs.de Bloggeramt.de Blog Directory powered by rankingcloud