Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hey, I'm using a php signup script on my website that I downloaded from a site, the script uses mysql, htpasswd and htaccess, my problem is after the users signed up
when they try to log in to protected files their username and password doesn't work I've checked the .htpasswd
file and notice that the password was encrypted in a different way, the script has 2 format of encrypting
the passwords..they look like thisusername:aaT1pdS0NZaTE
(script format 1)username:b3be0b50739dcb1dc3effd8bae1e100a
(script format 2)I tried both formats and neither of them work the only format that works with my webserver is when I encrypt
the password using apache htpasswd.exeusername:$Bfu2$GD4..$cGdDzkSXwf0C8HDRUMSg1
(apache format)is there any way I can make my webserver work with the 2 other encrypted passwords?

The easiest method (though not as secure as the Apache method) would be to store the username and passwords in a database, using standard MD5 hashes, and don't even deal with .htpasswd.
If you do want to use the .htpasswd, you should use crypt() if I'm not mistaken.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |