Strange authentication behaviour - apache on windows host

Discussion in 'Apache' started by hfiliz, Mar 4, 2012.

  1. #1
    Hi there, my first post here...


    I have an authentication problem


    apache host OS: windows XP sp3 (this is my local testing server)
    apache: v.2.2
    active authentication module: mod_auth_basic.so


    writing a utility to create htpasswd file, utility is in php.


    lets say


    user_name = user1
    plain_passwd = 123


    using php md5() function ( <?php md5($plain_passwd) ?> )

    user1:$1$OA/.9t1.$cy./BZt3Fjg1LQQFF9wEX/


    on my web server I have a folder with .htaccess & .htpasswd


    when I try www.mylink.com/myfolder, I could only be authorized using

    username: user1
    passwd: $1$OA/.9t1.$cy./BZt3Fjg1LQQFF9wEX/


    but below is not working


    username: user1
    passwd: 123


    what am I doing wrong here? When I use htpasswd.exe it works properly, but I need to be able to solve the problem using php functionality only!.


    On unix-side everything works properly...
     
    hfiliz, Mar 4, 2012 IP
  2. hfiliz

    hfiliz Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I can't update my own post --I guess forum rules for new users..

    update-1: my profile is new, so I can't put live links here at the moment, but I guess people have similar issues posted here too, do you guys think that windows' htpasswd.exe produces different md5() than unix's htpasswd/php md5() ???
     
    hfiliz, Mar 4, 2012 IP