[pmwiki-users] UserAuth2

ThomasP pmwikidev at sigproc.de
Wed Sep 12 09:03:57 CDT 2007


Hello,

[this one went over the list]

On Sat, September 8, 2007 14:53, Andy Kaplan-Myrth wrote:
> Andy Kaplan-Myrth wrote:
>> I decided to make the switch from UserAuth to UserAuth2 today. It went
>> smoothly until I tried to log in as "admin" with no password, the
>> default user. I had the same problem that IchBin reported in emails from
>> earlier this year: At the login page, I enter "admin" with no password,
>> and it returns to the page saying "Authentication required". If I try to
>> edit a page (in order to force a login request), it asks for my username
>> and password and then returns me to the page, but not editing it.
>>
>> I can tell that it processes my username and password correctly and that
>> it created the "admin" user correctly -- if I put in a different
>> username or a different password it returns "Wrong password supplied"
>> instead.
>>
>> This is on Windows with Apache and PHP 5.2.0. I tried giving all users
>> full privileges on the entire UserAuth2 subfolder in Cookbook/, but that
>> didn't help. Ii also tried it on a vanilla install of PmWiki, with no
>> other cookbooks at all installed. In contrast, on a vanilla installation
>> of PmWiki on my Linux server (with PHP 5.2.1), it works perfectly.
>>
>> Does anybody have UserAuth2 running on Windows with Apache and this
>> version of PHP?
>>
>> Cheers,
>> Andy
>>
>>
> Nobody replied to this. Does that mean nobody runs UserAuth2 on Windows?
>
> Or has AuthUser gained enough functionality that I should start using it
> instead of UserAuth? If so, can I migrate my accounts and passwords from
> their .htpasswd file?
>
> Any help would be much appreciated -- I've been a happy UserAuth user
> but found that it messes up pagelists when I upgrade pmwiki to recent
> betas.
>
> Cheers,
> Andy
>
>

I have developed and am maintaining the UserAuth2 code, but haven't had
time to read the list very often recently.

There has been at least one Windows user, which discovered some problems
with the use of the flock() function in the code when using Windows.

In your situation, the problem will be that the session state is not
correctly saved. You can test this by writing a

      global $HTMLFooterFmt; // since pmwiki-?.?
      $HTMLFooterFmt[] = ">".$_SESSION['username']."<";

somewhere in GetUserLoginForm() in userauth2.php. If you are "kept" logged
in properly, you will see the username printed, otherwise it is empty. (In
the latter case check all related settings: Is the session save path set
appropriately? Is it writable?)

Thomas

NB: The sessions are always a bit mysterious, and I don't know whether we
had found a solution for every of the problem cases that occurred.







More information about the pmwiki-users mailing list