This is all better now.

I compiled with libmcrypt and php-4.0.6 at the same time, so I'm not sure
exactly which caused the fix, but it works now.  Also, the perl module I
was using seemed to generate "apache stype" md5 hash, which is another
reason why authenticating with postgres and md5 hashes wasn't working when
just inserting hashes generated with Crypt::PasswdMD5.  Php and openssl
passwd -1 generate the correct system hashes.

Everything is good.

-jeremy


On Tue, 17 Jul 2001, tc lewis wrote:

>
> On Tue, 17 Jul 2001, Jeremy Hansen wrote:
> > On Tue, 17 Jul 2001, tc lewis wrote:
> > > try:
> > > <php echo(CRYPT_SALT_LENGTH); ?>
> > > <php echo(CRYPT_MD5); ?>
> > >
> > > or:
> > > <php echo constant("CRYPT_SALT_LENGTH"); ?>
> > > <php echo constant("CRYPT_MD5"); ?>
> > >
> > > you should get output of 12 and 1 (not 2 and 0) if md5 is supported in
> > > crypt(), i think.
> >
> > Yeah, I'm getting 2 and 0.  Lame.  What's the answer to this.
>
> i'm not sure.  i don't see any related configure flags or php.ini
> settings.  it seems to work with standard redhat 7.1 linux (i'm assuming
> you're using some redhat-ish system, as i know you):
>
> [tcl@jobo tcl]$ cat nog.php
> #!/usr/bin/php
> <?php echo(constant('CRYPT_SALT_LENGTH')); ?>
> <?php echo("\n"); ?>
> <?php echo(constant('CRYPT_MD5')); ?>
> <?php echo("\n"); ?>
> <?php echo(crypt('teststr', 'testsalt')); ?>
> <?php echo("\n"); ?>
> <?php echo(crypt('teststr', '$1$testsalt$')); ?>
> <?php echo("\n"); ?>
> [tcl@jobo tcl]$ ./nog.php
> X-Powered-By: PHP/4.0.4pl1
> Content-type: text/html
>
> 2
> 1
> te4c1aD5wKOnM
> $1$testsalt$W00xFyq3oO6fDqto9qMY00
> [tcl@jobo tcl]$
>
> any suggestions from the rest of the list?
>
> you could try using the mhash library stuff instead.  blah.
>
> -tcl.
>
>
>

-- 
salad.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to