[英]Sphinx:Server sent charset unknown to the client. Please, report to the developers
I'm using Sphinx 2.0.5 and while I call indexer through PHP, Im getting error Sphinx:Server sent charset unknown to the client. 我正在使用Sphinx 2.0.5,当我通过PHP调用indexer时,我得到错误Sphinx:服务器发送了客户端未知的charset。 Please, report to the developers . 请向开发人员报告 。 What can be the problem ? 可能是什么问题?
Server PHP version is 5.6.30 服务器PHP版本是5.6.30
Only problem occurs when trying to connect Sphinx using mysql or mysqli via PHP. 尝试通过PHP使用mysql或mysqli连接Sphinx时,只会出现问题。
$link = mysqli_connect ( "127.0.0.1", "root", "", "", 9306 ) or sendErrorMail(array("subject"=>"Failed to connect to sphinx ","sql"=>"","error"=> mysqli_connect_error()));
OR 要么
$link = mysql_connect ( "127.0.0.1:9306", "", "" ) or sendErrorMail(array("subject"=>"Failed to connect to sphinx","sql"=>"","error"=> mysql_error()));
Is the a requirement of any configuration changes ? 是否需要更改任何配置? What am I missing ? 我错过了什么? Can anyone help ? 有人可以帮忙吗?
Below code works fine : 下面的代码工作正常:
$cl = $this->sphinxclient;
$cl->resetFilters();
$cl->SetMatchMode(SPH_MATCH_EXTENDED2);
$cl->setFilter('eventid',array($param['eventId']));
$result = $cl->Query('','indexerName');
In linux Sphinx gets connected properly using below command : 在linux中,Sphinx使用以下命令正确连接:
mysql -h 127.0.0.1 -P 9306
Got it solved. 得到了解决。 Probably this occurs with PHP version > 5.4. PHP版本> 5.4可能会发生这种情况。 In Sphinx Installation Bundle there is a file "searchd.cpp" . 在Sphinx安装包中有一个文件“searchd.cpp” 。 Over there server language is specified as \\x00 change it to \\x21 and reinstall sphinx. 在那里服务器语言指定为\\ x00将其更改为\\ x21并重新安装sphinx。 Problem will be solved. 问题将得到解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.