anonymous user

Forums   Register   Login   Forgot your login/password?   Search

Warning: mysql_connect(): Server sent charset (0) unknown to the

Common forum | 1 | 2 | 3 | 4 | 5 | ... | 519 | 520 | 521 | 522 | next »» | Create new thread

Roze

Name: Reinis Rozitis
Posts: 4

2012-07-20 13:56:08 | reply!


Hello,
with php 5.4.5 (and mysqlnd) a simple <? mysql_connect('sphinxserverip'); ?> fails with a
Warning: mysql_connect(): Server sent charset unknown to the client. Please, report to
the developers'


I checked the changes between 5.4.4 and 5.4.5 and new code has been introduced (in
php-5.4.5/ext/mysqlnd/mysqlnd.c (fancy that the version numbers don't change)):


                conn->greet_charset = mysqlnd_find_charset_nr(greet_packet->charset_no);
+ if (!conn->greet_charset) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
+ "Server sent charset (%d) unknown to the client. Please, report to the developers",
greet_packet->charset_no);
+ SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
+ "Server sent charset unknown to the client. Please, report to the developers");
+ goto err;
+ }



I wonder if this more of a problem on the Sphinx side or php mysqlnd implementation?


Currently running Sphinx 2.1.0-dev (r3175) - it's a bit oldish release so maybe this has
even been fixed?

zykarl

Name: zykarl
Posts: 2

to: Roze, 2012-07-24 06:19:10 | reply!


My solution is as follows:

Change line 15083 of searchd.cpp from
        "\x00" // server language
to
        "\x21" // server language

\x21 means utf8 and utf8_general_ci

>
> Hello,
> with php 5.4.5 (and mysqlnd) a simple <? mysql_connect('sphinxserverip'); ?> fails with a
> Warning: mysql_connect(): Server sent charset unknown to the client. Please, report to
> the developers'
>
>
> I checked the changes between 5.4.4 and 5.4.5 and new code has been introduced (in
> php-5.4.5/ext/mysqlnd/mysqlnd.c (fancy that the version numbers don't change)):
>
>
> conn->greet_charset = mysqlnd_find_charset_nr(greet_packet->charset_no);
> + if (!conn->greet_charset) {
> + php_error_docref(NULL TSRMLS_CC, E_WARNING,
> + "Server sent charset (%d) unknown to the client. Please, report to the developers",
> greet_packet->charset_no);
> + SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
> + "Server sent charset unknown to the client. Please, report to the developers");
> + goto err;
> + }
>
>
>
> I wonder if this more of a problem on the Sphinx side or php mysqlnd implementation?
>
>
> Currently running Sphinx 2.1.0-dev (r3175) - it's a bit oldish release so maybe this has
> even been fixed?

zykarl

Name: zykarl
Posts: 2

to: Roze, 2012-07-24 06:22:11 | reply!


I'm using sphinx 2.0.4.

Sorry for forgetting that.

> Hello,
> with php 5.4.5 (and mysqlnd) a simple <? mysql_connect('sphinxserverip'); ?> fails with a
> Warning: mysql_connect(): Server sent charset unknown to the client. Please, report to
> the developers'
>
>
> I checked the changes between 5.4.4 and 5.4.5 and new code has been introduced (in
> php-5.4.5/ext/mysqlnd/mysqlnd.c (fancy that the version numbers don't change)):
>
>
> conn->greet_charset = mysqlnd_find_charset_nr(greet_packet->charset_no);
> + if (!conn->greet_charset) {
> + php_error_docref(NULL TSRMLS_CC, E_WARNING,
> + "Server sent charset (%d) unknown to the client. Please, report to the developers",
> greet_packet->charset_no);
> + SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
> + "Server sent charset unknown to the client. Please, report to the developers");
> + goto err;
> + }
>
>
>
> I wonder if this more of a problem on the Sphinx side or php mysqlnd implementation?
>
>
> Currently running Sphinx 2.1.0-dev (r3175) - it's a bit oldish release so maybe this has
> even been fixed?

daavaa

Name: David Dzhagayev
Posts: 1

to: zykarl, 2012-08-08 20:20:06 | reply!


> My solution is as follows:
>
> Change line 15083 of searchd.cpp from
> "\x00" // server language
> to
> "\x21" // server language
>
> \x21 means utf8 and utf8_general_ci
>

Hi, I have the same issue, I have such question, should I rebuild the sphinx after that?
I'm using 0.9.9-release(r2117), I've tried, and have successfully rebuilt sphinx, but it
did not fix warning issue :( While waiting for any suggestions will try with other newer
release

fedorz

Name: Zoltan Fedor
Posts: 2

to: daavaa, 2012-09-11 00:00:44 | reply!


> > My solution is as follows:
> >
> > Change line 15083 of searchd.cpp from
> > "\x00" // server language
> > to
> > "\x21" // server language
> >
> > \x21 means utf8 and utf8_general_ci

Hi,
I have the same issue and replaced "\x00" with "\x21", complied but it didn't solve the
problem. I tried with version 2.0.4 and 2.0.5, but both failed. I'm using PHP 5.3.16.

Is it confirmed that this defect is solved, as it doesn't seem so?

fedorz

Name: Zoltan Fedor
Posts: 2

to: fedorz, 2012-09-11 01:09:20 | reply!


> Hi,
> I have the same issue and replaced "\x00" with "\x21", complied but it didn't solve the
> problem. I tried with version 2.0.4 and 2.0.5, but both failed. I'm using PHP 5.3.16.
>
> Is it confirmed that this defect is solved, as it doesn't seem so?

Please ignore my previous message, my test script was still connecting to the un-patched
version of Sphinx...
My bad.
I can confirm that the above solution ( replace "\x00" with "\x21" ) does work.

RJ45

Name: Alexander
Posts: 13

to: fedorz, 2013-12-25 10:23:54 | reply!


Have the same problem. Useing PHP Version 5.3.28-1~dotdeb.0 ; Sphinx 2.0.8-release
(r3831).
In source code of searchd.cpp:
"\x21" // server language; let it be utf_general_ci to make different clients happy

But I still have "Server sent charset (0) unknown to the client. Please, report to the
developers". Can anybody help me?

Common forum | 1 | 2 | 3 | 4 | 5 | ... | 519 | 520 | 521 | 522 | next »» | Create new thread