Re: problem using crypt() without a salt

From: Date: Wed, 14 Jan 2009 10:00:44 +0000
Subject: Re: problem using crypt() without a salt
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-286304@lists.php.net to get a copy of this message
I have a problem with using crypt(), passing only one parameter (ie, no salt). When I do that, I get an empty string. When I do use a salt, it returns the expected value. Does anybody have any ideas what might be causing my problem? It only happens when I run it on my linux server, but not when I run it on my Windows dev machine. Thanks in advance.
I am not sure what exactly is the problem. But check this from the manual: If no salt is provided, PHP will auto-generate a standard two character salt by default, unless the default encryption type on the system is MD5, in which case a random MD5-compatible salt is generated. http://gr2.php.net/manual/en/function.crypt.php Perhaps your PHP compilation or the package are broken. -- Thodoris

« previous php.general (#286304) next »