Sphinx: The server sent an encoding unknown to the client. Please inform developers

I use Sphinx 2.0.5, and while I call the indexer via PHP, I get a Sphinx error message : the server sent an encoding unknown to the client. Please inform the developers . What could be the problem?

PHP Server Version 5.6.30

When trying to connect to Sphinx using mysql or mysqli via PHP, only the problem occurs.

$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 there a requirement for any configuration changes? What am I missing? Can anyone help?

Below code is working fine:

    $cl = $this->sphinxclient;
    $cl->resetFilters();
    $cl->SetMatchMode(SPH_MATCH_EXTENDED2);
    $cl->setFilter('eventid',array($param['eventId']));
    $result = $cl->Query('','indexerName');

On linux, Sphinx connects correctly using the following command:

mysql -h 127.0.0.1 -P 9306

+4
source share
1

. , PHP > 5.4. Sphinx "searchd.cpp" . \x00, \x21 . .

0

Source: https://habr.com/ru/post/1669152/


All Articles