James, always a GodSend I'll try this out and see if it works. If it doesn't, must be somehting in my apache configuration...
Thanks again wish me LUCK! (Doing something else for another project with this Left Join that is suitable for framing...) Marian --- In [email protected], James Keeline <[EMAIL PROTECTED]> wrote: > --- Marian Briones <[EMAIL PROTECTED]> wrote: > > > Well I couldn't get this to work. I do not know what to do. I can't > > find anything on it except what **should** work and it does not. > > > > I tried m5, I tried crypt, and neither made a workable password that > > allowed me to then try to login as that user. > > > > I can run htpasswd from the command line and create what I need and > > guess what, it works when I go in as that username...but when I try to > > print that password through php, no can do. > > > > Does anyone have anything they have used to do this that I could at > > least **try?** > > > > This project is in danger of being canceled and here I am stuck. > > > > I wrote a quick script to see if it could write to friends and put working > values for mod_auth: > _____ > <?php > > $users = array('jon'=>'secret', > 'tom'=>'secret', > 'sue'=>'secret'); > > $fp = fopen("friends","a"); > > foreach ($users as $u=>$p) > { > $pwd = crypt($p); > $line = "$u:$pwd\n"; > fwrite($fp, $line); > } > > fclose($fp); > > print "<pre>\n"; > readfile("friends"); > print "</pre>\n"; > ?> > _____ > > This wrote three users and three passwords to friends: > > jon:$1$xLsbVke1$qJ.cnfUcdpvpx5K2/U1BE1 > tom:$1$mNk/kfgL$a3vREFsvkFCr7OFaeC8gJ/ > sue:$1$Ai82whtF$E9zTQGJ9WQ6aeG3SDZUeZ0 > > To use it I set up a directory on my server called /www/keeline/marion and it > has a .htaccess file: > _____ > AuthName Marion > AuthType Basic > AuthUserFile "/www/keeline/marion/friends" > require valid-user > > _____ > > (note the blank line and valid-user in lower case) > > I can log in with jon and secret. > > See if you can log in with one of these username passwords: > > http://www.Keeline.com/marion > > James > > James D. Keeline > http://www.Keeline.com http://www.Keeline.com/articles > http://Stratemeyer.org http://www.Keeline.com/TSCollection > > http://www.ITeachPHP.com -- Free Computer Classes: Linux, PHP, etc. > Summer Semester Begins Jun 20 -- New Classes Start Every Few Weeks. ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/HKFolB/TM --------------------------------------------------------------------~-> Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
