Re: md5() different from md5sum on Linux

From: Date: Wed, 13 Mar 2002 02:23:22 +0000
Subject: Re: md5() different from md5sum on Linux
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-88283@lists.php.net to get a copy of this message
heheh....you forgot something :) echo "blah" is actually "blah\n" # echo -n "blah" |md5sum 6f1ed002ab5595859014ebf0951522d9 stdin -d Mikhail Avrekh wrote:
Hello, Don't know if this is a question of (mis)configuration; I'm posting this just in case someone had run into this before: PHP's native md5() appears to return a different value from Linux's md5sum command: [mavrekh ~]$ echo "blah" | md5sum 0d599f0ec05c3bda8c3b8a68c32a1b47 - [mavrekh ~]$ php testmd5.php X-Powered-By: PHP/4.0.3pl1 Content-type: text/html 6f1ed002ab5595859014ebf0951522d9 [mavrekh ~]$ cat testmd5.php <?=md5("blah")?> I've tried it without the quotes too, or with single quotes. I wonder if this is something that can be configured at compile time ? I'm using PHP/4.0.3pl1 RedHat7.1 Thanks ! M.


« previous php.general (#88283) next »