Crypt() not supported under Win32?

From: Date: Wed, 18 Oct 2000 17:03:56 +0000
Subject: Crypt() not supported under Win32?
Groups: php.general 
Request: Send a blank email to php-general+get-20929@lists.php.net to get a copy of this message
Hi, I am currently developing a website for a client whose ISP runs Microsoft NT... PHP4 reports the following error when using the function crypt(): Warning: crypt() is not supported in this PHP build in D:\Inetpub\ftproot\my_client_site\test.php on line 4 One user added a comment where he uses the Perl crypt function to circumvent this problem. I don't know if my client's ISP has Perl installed on the system (and should not really have to bother...), but just in case I tested the example by substituting crypt() with the code below: // this replaces $cryptString = crypt($plainString, $salt); $command = "perl -e \"print crypt('$plainString', '$salt');\""; $cryptString = exec($command); and then I get the following output: Warning: Unable to fork [perl -e "print crypt ('my_password_unencripted', 'WS');"] in D:\Inetpub\ftproot\my_client_site\test.php on line 7 where $salt == 'WS' How should I do to mimic crypt() in such a case??? ------------------- Another question: some persons use a fixed salt to encrypt their passwords. Some persons on the other hand generate randomic salt strings so that when a password is encrypted a different salt string is used each time. Is there any advantage of using different salt strings each time??? considering the DES encryption method, since the salt string is present in the two first characters of the encrypted string, any user who manage to have access to the database would then have access to the salt string, thus making it indifferent if the salt used is always the same.... Any comments? TIA, Paulo php@brazilinfo.com

« previous php.general (#20929) next »