ID:               48928
 Updated by:       j...@php.net
 Reported By:      serge dot laot at wanadoo dot fr
-Status:           Open
+Status:           Bogus
 Bug Type:         MySQL related
 Operating System: Win XP Pro, Win server 2003
 PHP Version:      5.2.10
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2009-07-15 16:37:54] serge dot laot at wanadoo dot fr

Description:
------------
php_mysql.dll (or php_mysqli.dll) extension do not use the same
configuration as MySQL.exe, so if you run the same query from both sides
you will not get the same results.

I know I can use the following :

@@mysql_query("SET NAMES 'utf8'",$my);

on a fresh connection, but if the MySQL configuration changes I must
have to change the php code as well.

Reproduce code:
---------------
PHP code :
$rec=@@mysql_query("show Variables LIKE 'c___a%_%'",$my);
while($row=mysql_fetch_assoc($rec)){
    foreach($row as $n=>$v){
        echo $v."\n";
    }
}

MySQL code ;
show Variables LIKE 'c___a%_%';

Expected result:
----------------
Mysql.exe results :
Variable_name               Value
character_set_client        utf8
character_set_connection    utf8
character_set_database      utf8
character_set_filesystem    binary
character_set_results       utf8
character_set_server        utf8
character_set_system        utf8
character_sets_dir          ...\share\charsets\
collation_connection        utf8_general_ci
collation_database          utf8_general_ci
collation_server            utf8_general_ci


Actual result:
--------------
php_mysql.dll results :
Variable_name               Value
character_set_client        latin1
character_set_connection    latin1
character_set_database      utf8
character_set_filesystem    binary
character_set_results       latin1
character_set_server        utf8
character_set_system        utf8
character_sets_dir          ...\share\charsets\
collation_connection        latin1_swedish_ci
collation_database          utf8_general_ci
collation_server            utf8_general_ci



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48928&edit=1

Reply via email to