【问题标题】:Unable to get sphinx to execute through PHP via SSH - connection faild errno 111无法通过 SSH 通过 PHP 执行 sphinx - 连接失败 errno 111
【发布时间】:2012-10-22 11:15:50
【问题描述】:

我已经在 Linux 服务器上设置了 spinx - 索引已通过 SSH 工作我现在正在尝试将 sphinx 连接到网站“前端”上的 PHP

这是我尝试使用的 search.php 文件 http://pastebin.com/Q27dK6Kq

每次我从命令行运行 php search.php 时,都会出现以下错误: 查询失败:连接到 195.xxx.xxx.xxx:3312 失败(errno=111,msg=Connectioned denied)。任何想法如何解决这个问题?

下面是我的 Sphinx 配置文件

sphinx.conf

#

最小的 Sphinx 配置示例(干净、简单、实用)

#

来源文章 { 类型 = 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

}

索引测试1 { 来源=文章 路径 = 数据/test1 文档信息 = 外部 charset_type = sbcs }

索引测试 { 类型 = rt rt_mem_limit = 32M

    path                    = data/testrt
    charset_type            = utf-8

    rt_field                = Title
    rt_field                = Description

}

索引器 { mem_limit = 32M }

搜索 { 听 = 9312 听 = 3312:mysql41 日志 = /var/log/searchd.log query_log = /var/log/query.log }

【问题讨论】:

  • 更新:我注意到端口不正确并已修复这些 - 我现在收到以下错误:Query failed: failed to read searchd response (status=2613, ver=11824, len=775501357, read=74). 有什么想法吗?

标签: php ssh full-text-search sphinx


【解决方案1】:

已修复 - 由于某种原因,安装已损坏并且缺少一个文件。 #奇怪

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-02-10
    • 1970-01-01
    • 2020-05-12
    • 2021-08-28
    • 2020-07-27
    • 2015-10-21
    相关资源
    最近更新 更多