I think I see what you mean.
Near line 933 in file WikiUserNew.php when the new instance of _FilePassUser is being created, a third parameter to the constructor line 20 of File.php is not being pased in.

constructor
    function _FilePassUser($UserName='', $prefs=false, $file='') {

line 933 of WikiUserNew.php....

                    } elseif (in_array('File', $dbh->getAuthParam('USER_AUTH_ORDER')) and
                              defined('AUTH_USER_FILE') and file_exists(AUTH_USER_FILE)) {
                        include_once("lib/WikiUser/File.php");
                        if (check_php_version(5))
                            return new _FilePassUser($UserName, $this->_prefs);
                        else {
                            $user = new _FilePassUser($UserName, $this->_prefs);                            eval("\$this = \$user;");
                            // /*PHP5 patch*/$this = $user;
                            return $user;
                        }
                    } else {



If you could tell me how to reference the filename and pass it as the third argument to return new _FilePassUser($UserName, $this->_prefs);
I could try that and test it and let you know if it fixes the issue.

Joel Schaubert


On 3/6/06, Reini Urban <rurban@x-ray.at> wrote:
joel schaubert schrieb:
> I am learning how to setup phpwiki to require and manage passwords.
> My settings are to have phpwiki manage the passwords in a file, no bogo
> login, require passwords for any edits but allow viewing.
>
> This is working well, I add new users and passwords with either
> htpasswd, or I use the
> passencrypt.php page shipped with phpwiki and then cut and paste into my
> passwords file.  I have changed ownership on the file to the apache account.
>
> Now when I browse to the preferences page as some logged in user, I
> enter a new password.  I get the following errors dumping out on the
> page.  I think maybe there is some setup that I have missed?
>
> Or do I misunderstand the password system?  Perhaps that page is only
> for changing the password in the users home page preference file and
> they cannot change their password in the password file?

If AUTH_USER_FILE_STORABLE = true, Pear::File_Passwd is used to update
the password file. As seen below.

There's no config variable (yet) to allow self-creating users for
password files. Self-creating users should IMHO use PersonalPage settings.

> Here are the errors at the bottom of wiki/index.php/UserPreferences
> after trying to input a new password......
>
> lib/WikiUserNew.php (In template 'body' < 'html'):1116: Notice[8]:
> Undefined property: _FilePassUser::$_HomePagehandle
>
> lib/WikiUser/File.php (In template 'body' < 'html'):81: Notice[8]:
> Undefined property: File_Passwd::$_filename
>
> lib/WikiUser/File.php (In template 'body' < 'html'):82: Notice[8]:
> Undefined property: File_Passwd::$_filename

Oops. I'll have to check these.
Maybe $_filename is empty, which would lead to the error below.

> lib/pear/File_Passwd.php (In template 'body' < 'html'):103: Warning[2]:
> fopen(.lock) [<a href='function.fopen'>function.fopen</a>]: failed to
> open stream: Permission denied

That's the first critical error. The apache account has no rights to
write to this file.

> lib/pear/File_Passwd.php (In template 'body' < 'html'):104: Warning[2]:
> flock() expects parameter 1 to be resource, boolean given
> lib/pear/File_Passwd.php (In template 'body' < 'html'):235: Warning[2]:
> Invalid argument supplied for foreach()
--
Reini Urban
http://phpwiki.org/
http://helsinki.at/   http://spacemovie.mur.at/


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Phpwiki-talk mailing list
Phpwiki-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/phpwiki-talk