[pmwiki-users] authuser

Hans design at flutesong.fsnet.co.uk
Tue Jun 21 04:07:06 CDT 2005


I just installed beta 39, and failing to get authuser to work.
I have not tried any of the userauth scripts before, so I am a newbie
to this. I encountered several obstacles:
I installed in config.php (in a field part of a farm):

   include_once("$FarmD/scripts/authuser.php");
   $AuthUser['hans'] = crypt('mypass');

pmwiki loads authuser.php fine, but entering username 'hans' and
password 'mypass' does not let me enter edit mode on an edit protected
page or group or site, nor let me read if I set a sitewide default
read password. Only entering my admin passowrd lets me through.

The other obstacle is installing a .htpasswd file. I created a file
along the example given in Cookbook/UserAuth. I created it in the
field's local/ folder. I then tied to point to it in config.php
with $AuthUser[htpasswd]

   $AuthUser['htpasswd'] = '/local/.htpasswd';
   include_once("$FarmD/scripts/authuser.php");
   $AuthUser['hans'] = crypt('mypass');

which did not work because the relative path is wrong.
I realise I don't know how to set a relative file path to the
field's local folder.  I looked for a variable to give me the field's
root folder, but could only find $FarmD, which points to the Farm.

There is a page PmWiki/PathVariables on pmwiki.org, but it is missing in the
distribution.

Finally I found I had to set it like:

    $AuthUser['htpasswd'] = 'd:\www\flutesong\pmwiki\testwiki\local\.htpasswd';
or
    $AuthUser['htpasswd'] = 'd:/www/flutesong/pmwiki/testwiki/local/.htpasswd';
    
both types work on this Windows machine.

I write this in some detail because it was a source of much confusion,
and would be good to have it better documented. A path variable to the
field would be nice, and the missing page added to the distribution.

So now authuser.php finds the .htpasswd file, but it still refuses me
to enter the page.

-- 
Best regards,
 Hans                          




More information about the pmwiki-users mailing list