This is a discussion on md5() within the PHP Language forums, part of the PHP Programming Forums category; I am building an .htaccess file creator and obviously part of it is for directory protection. I 'm just trying ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am building an .htaccess file creator and obviously part of it is for
directory protection. I 'm just trying to figure out if I can do it all with php or if I need to use exec() to use htpasswd. Basically, I got a different result using php's md5() function than I did using Apache's htpasswd executible(with the md5 option) What is different between these two?????? -- Chris Mosser |
|
|||
|
On Mon, 6 Oct 2003 12:57:39 -0700, "Chris Mosser" <cmosser_at_comcast_dot_net>
wrote: >I am building an .htaccess file creator and obviously part of it is for >directory protection. I 'm just trying to figure out if I can do it all >with php or if I need to use exec() to use htpasswd. Basically, I got a >different result using php's md5() function than I did using Apache's >htpasswd executible(with the md5 option) > >What is different between these two?????? http://httpd.apache.org/docs-2.0/programs/htpasswd.html "htpasswd encrypts passwords using either a version of MD5 modified for Apache, or the system's crypt() routine. Files managed by htpasswd may contain both types of passwords; some user records may have MD5-encrypted passwords while others in the same file may have passwords encrypted with crypt()." [... to bottom of page ... ] Restrictions: [...] The MD5 algorithm used by htpasswd is specific to the Apache software; passwords encrypted using it will not be usable with other Web servers." -- Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |
|
|||
|
"Andy Hassall" <andy@andyh.co.uk> wrote in message news:pri3ov46koes6vie7e5gaucu3j73baup9h@4ax.com... > On Mon, 6 Oct 2003 12:57:39 -0700, "Chris Mosser" <cmosser_at_comcast_dot_net> > wrote: > > >I am building an .htaccess file creator and obviously part of it is for > >directory protection. I 'm just trying to figure out if I can do it all > >with php or if I need to use exec() to use htpasswd. Basically, I got a > >different result using php's md5() function than I did using Apache's > >htpasswd executible(with the md5 option) > > > >What is different between these two?????? > > http://httpd.apache.org/docs-2.0/programs/htpasswd.html > > "htpasswd encrypts passwords using either a version of MD5 modified for Apache, > or the system's crypt() routine. Files managed by htpasswd may contain both > types of passwords; some user records may have MD5-encrypted passwords while > others in the same file may have passwords encrypted with crypt()." > > [... to bottom of page ... ] > > Restrictions: > > [...] > > The MD5 algorithm used by htpasswd is specific to the Apache software; > passwords encrypted using it will not be usable with other Web servers." > > -- > Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) > Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) Thanks... so basically, if I want to use Apache's .htaccess for authentification, then I should use htpasswd to create the passwd file. -- Chris Mosser |
|
|||
|
> > >I am building an .htaccess file creator and obviously part of it is for
> > >directory protection. I 'm just trying to figure out if I can do it all > > >with php or if I need to use exec() to use htpasswd. Basically, I got a > > >different result using php's md5() function than I did using Apache's > > >htpasswd executible(with the md5 option) > > > > > >What is different between these two?????? > > > > http://httpd.apache.org/docs-2.0/programs/htpasswd.html > > > > "htpasswd encrypts passwords using either a version of MD5 modified for > Apache, > > or the system's crypt() routine. Files managed by htpasswd may contain > both > > types of passwords; some user records may have MD5-encrypted passwords > while > > others in the same file may have passwords encrypted with crypt()." > > > > [... to bottom of page ... ] > > > > Restrictions: > > > > [...] > > > > The MD5 algorithm used by htpasswd is specific to the Apache software; > > passwords encrypted using it will not be usable with other Web servers." > Thanks... so basically, if I want to use Apache's .htaccess for > authentification, then I should use htpasswd to create the passwd file. I've never used this, but you might want to check out: http://www.thewebmasters.net/php/Htpasswd.phtml It's a class that's supposed to help you manage Apache htpasswd files... Shawn -- Shawn Wilson shawn@glassgiant.com http://www.glassgiant.com |