stefan - 2005-07-12

I've installed phpwiki 1.3.11 rc3 recently.

I want to protect the wiki from getting spammed, so I decided to use db-auth and edited config.ini as follows:

DBAUTH_AUTH_DSN = "mysql://username:password@hostname/db-name"

DBAUTH_AUTH_USER_EXISTS = "SELECT userid FROM user WHERE userid='$userid'"
;
; Check to see if the supplied username/password pair is OK
;
; plaintext passwords:
;DBAUTH_AUTH_CHECK = "SELECT IF(passwd='$password',1,0) AS ok FROM user WHERE userid='$userid'"
;
; database-hashed passwords (more secure):
DBAUTH_AUTH_CHECK = "SELECT IF(passwd=PASSWORD('$password'),1,0) AS ok FROM user WHERE userid='$userid'"
;DBAUTH_AUTH_CRYPT_METHOD = plain

; If you want to use Unix crypt()ed passwords, you can use DBAUTH_AUTH_CHECK
; to get the password out of the database with a simple SELECT query, and
; specify DBAUTH_AUTH_USER_EXISTS and DBAUTH_AUTH_CRYPT_METHOD:
;DBAUTH_AUTH_CHECK = "SELECT passwd FROM user where userid='$userid'"
DBAUTH_AUTH_CRYPT_METHOD = crypt
;
; Update the user's authentication credential. If this is not defined but
; DBAUTH_AUTH_CHECK is, then the user will be unable to update their
; password.
;
; Plaintext passwords:
; DBAUTH_AUTH_UPDATE = "UPDATE user SET passwd='$password' WHERE userid='$userid'"
; Database-hashed passwords:
DBAUTH_AUTH_UPDATE = "UPDATE user SET passwd=PASSWORD('$password') WHERE userid='$userid'"
;
; Allow the user to create their own account.
DBAUTH_AUTH_CREATE = "INSERT INTO user SET passwd=PASSWORD('$password'),userid='$userid'"

However when I try to store my preferences (UserPreferences) I get the following error:

lib/WikiDB/backend/PearDB.php (In template 'body' < 'html'):1014: Error: wikidb_backend_peardb_mysql: fatal database error

* DB Error: no such field
* (UPDATE user SET prefs='a:4:{s:6:\&quot;userid\&quot;;s:10:\&quot;StefanNuss\&quot;;s:6:\&quot;passwd\&quot;;s:34:\&quot;$1$vRF0f638$n7gv.Cls8pLiF3Z5G.DUK/\&quot;;s:5:\&quot;email\&quot;;s:21:\&quot;stefan@basislager.org\&quot;;s:13:\&quot;emailVerified\&quot;;i:1;}' WHERE userid='StefanNuss' [nativecode=1054 ** Unknown column 'prefs' in 'field list'])
*

How can I fix this?

Any help highly appreciated.

Stefan