You are not logged in.

#1 2009-05-23 18:53:44

stabele
Member
Registered: 2008-12-22
Posts: 101

different md5 in phpMyAdmin and in mySql client (and PHP)

I have trouble with md5 function - mySql in command line and PHP returns one value, phpMyAdmin another. I have current packaged - PHP 5.2.9-3, mysql 5.1.34-1 and phpmyadmin  3.1.5-1. I searched web for possible reason, only one I found was different encoding, but I doubt that binary representation of string 'aaa' differ between any common encoding (at my machine 8859-1, 8859-2,utf-8). Please, could somebody post here result what is result at your system of

SELECT MD5('aaa');

from command line mysql client and from phpmyadmin ?

Last edited by stabele (2009-05-23 18:58:56)

Offline

#2 2009-05-24 14:05:28

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: different md5 in phpMyAdmin and in mySql client (and PHP)

charset:  UTF-8 Unicode (utf8) 

mysql 5.1.34-1       47bce5c74f589f4867dbd57e9ca9f808
phpmyadmin: 3.1.4-1  47bce5c74f589f4867dbd57e9ca9f808

ᶘ ᵒᴥᵒᶅ

Offline

#3 2009-05-24 18:01:03

stabele
Member
Registered: 2008-12-22
Posts: 101

Re: different md5 in phpMyAdmin and in mySql client (and PHP)

Thanks a lot for help. Still, phpmyadmin returns different value at my machine. I tried to downgrade to same versaion you have, but no success. Please, could you send what is result at you machine in command-line client and phpmyadmin of

SHOW VARIABLES LIKE '%char%'

Offline

#4 2009-05-24 21:06:27

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: different md5 in phpMyAdmin and in mySql client (and PHP)

they are identical for both:

Variable_name              Value
character_set_client       utf8
character_set_connection   utf8
character_set_database     latin1
character_set_filesystem   binary
character_set_results      utf8
character_set_server       latin1
character_set_system       utf8
character_sets_dir         /usr/share/mysql/charsets/

ᶘ ᵒᴥᵒᶅ

Offline

Board footer

Powered by FluxBB