Я начал Сфинкс на 192.168.1.102:9312 и попытался выполнить запрос от клиентской машины:SphinxQL-Query-Builder. PHP Предупреждение: пакеты не работают. Ожидаемый 0 получено 1. Размера пакета = 0
<?php
require __DIR__.'/../vendor/autoload.php';
use Foolz\SphinxQL\SphinxQL;
use Foolz\SphinxQL\Connection;
// create a SphinxQL Connection object to use with SphinxQL
$conn = new Connection();
$conn->setParams(array('host' => '192.168.1.102', 'port' => 9312));
$query = SphinxQL::create($conn)
->select('id')
->from('documents')
->match('content', 'вася SENTENCE молодец');
$result = $query->execute(); // here occurs Warning
Он производит следующий вывод:
$ php sphinx.php
PHP Warning: Packets out of order. Expected 0 received 1. Packet size=0 in /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php on line 54
PHP Stack trace:
PHP 1. {main}() /var/www/sphinxql/src/sphinx.php:0
PHP 2. Foolz\SphinxQL\SphinxQL->execute() /var/www/sphinxql/src/sphinx.php:17
PHP 3. Foolz\SphinxQL\SphinxQL->compile() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:261
PHP 4. Foolz\SphinxQL\SphinxQL->compileSelect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:399
PHP 5. Foolz\SphinxQL\SphinxQL->compileMatch() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:559
PHP 6. Foolz\SphinxQL\Drivers\SimpleConnection->escape() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:467
PHP 7. Foolz\SphinxQL\Drivers\SimpleConnection->ping() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:191
PHP 8. Foolz\SphinxQL\Drivers\SimpleConnection->connect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:80
PHP 9. mysqli->real_connect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:54
PHP Warning: mysqli::real_connect(): MySQL server has gone away in /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php on line 54
PHP Stack trace:
PHP 1. {main}() /var/www/sphinxql/src/sphinx.php:0
PHP 2. Foolz\SphinxQL\SphinxQL->execute() /var/www/sphinxql/src/sphinx.php:17
PHP 3. Foolz\SphinxQL\SphinxQL->compile() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:261
PHP 4. Foolz\SphinxQL\SphinxQL->compileSelect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:399
PHP 5. Foolz\SphinxQL\SphinxQL->compileMatch() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:559
PHP 6. Foolz\SphinxQL\Drivers\SimpleConnection->escape() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:467
PHP 7. Foolz\SphinxQL\Drivers\SimpleConnection->ping() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:191
PHP 8. Foolz\SphinxQL\Drivers\SimpleConnection->connect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:80
PHP 9. mysqli->real_connect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:54
PHP Warning: mysqli::real_connect(): Error while reading greeting packet. PID=10605 in /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php on line 54
PHP Stack trace:
PHP 1. {main}() /var/www/sphinxql/src/sphinx.php:0
PHP 2. Foolz\SphinxQL\SphinxQL->execute() /var/www/sphinxql/src/sphinx.php:17
PHP 3. Foolz\SphinxQL\SphinxQL->compile() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:261
PHP 4. Foolz\SphinxQL\SphinxQL->compileSelect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:399
PHP 5. Foolz\SphinxQL\SphinxQL->compileMatch() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:559
PHP 6. Foolz\SphinxQL\Drivers\SimpleConnection->escape() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:467
PHP 7. Foolz\SphinxQL\Drivers\SimpleConnection->ping() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:191
PHP 8. Foolz\SphinxQL\Drivers\SimpleConnection->connect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:80
PHP 9. mysqli->real_connect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:54
PHP Warning: mysqli::real_connect(): (HY000/2006): MySQL server has gone away in /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php on line 54
PHP Stack trace:
PHP 1. {main}() /var/www/sphinxql/src/sphinx.php:0
PHP 2. Foolz\SphinxQL\SphinxQL->execute() /var/www/sphinxql/src/sphinx.php:17
PHP 3. Foolz\SphinxQL\SphinxQL->compile() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:261
PHP 4. Foolz\SphinxQL\SphinxQL->compileSelect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:399
PHP 5. Foolz\SphinxQL\SphinxQL->compileMatch() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:559
PHP 6. Foolz\SphinxQL\Drivers\SimpleConnection->escape() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php:467
PHP 7. Foolz\SphinxQL\Drivers\SimpleConnection->ping() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:191
PHP 8. Foolz\SphinxQL\Drivers\SimpleConnection->connect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:80
PHP 9. mysqli->real_connect() /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:54
PHP Fatal error: Uncaught Foolz\SphinxQL\Exception\ConnectionException: Connection Error: [2006]MySQL server has gone away in /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php:60
Stack trace:
#0 /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php(80): Foolz\SphinxQL\Drivers\SimpleConnection->connect()
#1 /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php(191): Foolz\SphinxQL\Drivers\SimpleConnection->ping()
#2 /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php(467): Foolz\SphinxQL\Drivers\SimpleConnection->escape('(@content \xD0\xB2\xD0\xB0\xD1...')
#3 /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php(559): Foolz\SphinxQL\SphinxQL->compileMatch()
#4 /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php(399): Foolz\SphinxQL\SphinxQL->compileSelect()
#5 /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/SphinxQL.php(261): Foolz\SphinxQL\SphinxQL->compile()
# in /var/www/sphinxql/vendor/foolz/sphinxql-query-builder/src/Drivers/SimpleConnection.php on line 60
Что не так?
Отлично! Большое спасибо! – mnv