md5()

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-06-2003
Chris Mosser
 
Posts: n/a
Default md5()

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


Reply With Quote
  #2 (permalink)  
Old 10-06-2003
Andy Hassall
 
Posts: n/a
Default Re: md5()

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)
Reply With Quote
  #3 (permalink)  
Old 10-06-2003
Chris Mosser
 
Posts: n/a
Default Re: md5()



"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


Reply With Quote
  #4 (permalink)  
Old 10-07-2003
Shawn Wilson
 
Posts: n/a
Default Re: md5()

> > >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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:29 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0