0
votes

I've setup spinx as followed on a Linux server - the indexing has worked via SSH I am now trying to connect the sphinx to the PHP on the 'front-end' of the website

Here is the search.php file I am trying to use http://pastebin.com/Q27dK6Kq

Each time I run the php search.php from the command line I get the following error: Query failed: connection to 195.xxx.xxx.xxx:3312 failed (errno=111, msg=Connectioned refused). Any ideas how to fix this?

Below is my Sphinx config file

sphinx.conf

#

Minimal Sphinx configuration sample (clean, simple, functional)

#

source article { type = mysql

    sql_host                = localhost
    sql_user                = username
    sql_pass                = randompassword
    sql_db                  = my_database
    sql_port                = 3306  # optional, default is 3306

    sql_query               = SELECT ID, Title, Description from articles

    # sql_attr_uint         = group_id
    # sql_attr_timestamp    = date_added

    sql_query_info          = SELECT * FROM articles WHERE ID=$id

}

index test1 { source = article path = data/test1 docinfo = extern charset_type = sbcs }

index testrt { type = rt rt_mem_limit = 32M

    path                    = data/testrt
    charset_type            = utf-8

    rt_field                = Title
    rt_field                = Description

}

indexer { mem_limit = 32M }

searchd { listen = 9312 listen = 3312:mysql41 log = /var/log/searchd.log query_log = /var/log/query.log }

1
UPDATE: I noticed the ports were incorrect & have fixed these - I now get the following error: Query failed: failed to read searchd response (status=2613, ver=11824, len=775501357, read=74). Any ideas?Zabs

1 Answers

0
votes

Fixed - for some reason the installation got corrupted and was missing a single file. #weird