[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] PHP crypt() function stalls page on Raq2 with PHP4.03pl1



"Crocket" <crocket@xxxxxxxxxxx> wrote:
> I don't know whether this is a raq2 or PHP4 problem so I'm gonna ask
anyway
> just to make sure.
> Before php4.03pl01 , PHP 3.07 (from the available rpm's at cobalt's ftp
> site) was installed on our raq2.
> Scripts that were using the crypt() function never gave me any problems
> until I
> had php4.03pl01 installed by a cobalt distributor.

What error do you get?  I just tested on a RaQ2 running PHP4.0.5 and it
worked fine.  I'd post to the php-general list.

## Code
<?php

$str = 'Steve';
echo 'String is $str.';

$str_encrypted = crypt( $str );
echo "<br>Encrypted string is $str_encrypted.";

?>

## Output
String is $str.
Encrypted string is cEyj98xtpyN7I.

> Everything seemed to work fine until I ran into that problem.
> The crypt() function is called when a new user signs up and his password
> needs to be encrypted before it's stored in a MySQL db.

MySQL uses a different encryption method, which can be accessed using the
MySQL function PASSWORD().  Perhaps you want to use that function within
your SQL statement instead.  It would be interesting to see if that causes
an error.  Also you can create UNIX encrypted passwords using the MySQL
function CRYPT() so it would be interesting whether you can use that.  I'm
running MySQL 3.23.37 and CRYPT() doesn't work though.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/