[pmwiki-users] authuser

Patrick R. Michaud pmichaud at pobox.com
Tue Jun 21 08:09:51 CDT 2005


On Tue, Jun 21, 2005 at 10:07:06AM +0100, Hans wrote:
> 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.  

Normally one simply uses 'local/.htpasswd'  (notice no leading slash).
This is how all of the PmWiki scripts do it, so if it works for them
it should work for you.  :-)

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

When PmWiki is executing, the field is always the current directory.
Thus one can simply write "local/.htaccess", or if you really want something
to indicate "the field" then "./local/.htaccess" will work.

Pm



More information about the pmwiki-users mailing list