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:
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
How can I fix this?
Any help highly appreciated.
Stefan