Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

authentication againts external database

Help
lrk_comp
2006-10-27
2012-10-11
  • lrk_comp
    lrk_comp
    2006-10-27

    Hello,

    I have installed phpwiki-1.3.11p1.tar.gz on my web space and now I'm trying to authenticate my users using other external mysql database. This is what I got in my config.ini file:

    DBAUTH_AUTH_DSN = "mysql://admin:xxxxx@localhost/mysql_datas"

    DBAUTH_AUTH_USER_EXISTS = "SELECT id FROM people WHERE login='$userid'"

    DBAUTH_AUTH_CHECK = "SELECT pw AS passwd FROM people where logiin='$userid'"
    DBAUTH_AUTH_CRYPT_METHOD = plain

    NOTE: i'm aware of error logiin in real it is login

    and I get error message:
    Fatal Error:

    lib/WikiDB/backend/PearDB.php:1024: Error: wikidb_backend_peardb_mysql: fatal database error

    * DB Error: no such field
    * (SELECT pw AS passwd FROM people where logiin='qwerty' [nativecode=1054 ** Unknown column 'logiin' in 'where clause'])
    *
    

    lib/DbSession/SQL.php:97: Notice: Only variables should be assigned by reference

    I understand that logiin field does not exists but why $userid=password. qwerty is my password entered NOT userid. Both variables $userid and $password = qwerty

    what am I missing?

    thank you