If you need to know who is connecting to your server, and have for example, a Mysql database with logins and passwords, you can enable database Support.
Palabre is working with ADODB. So it can connect to different databases : Mysql, sqlite, postresql -almost-, oracle, access, odbc, ...
Currently under Windows, Postgresql support is buggy. Under other systems (non compiled palabre versions) you need to have the python Adodb module installed and the correct database module installed (ex: for mysql : MysqlDB, for Posgresql : PsycoPg, ...)
For full list and informations, please see : http://phplens.com/lens/adodb/adodb-py-docs.htm#databases
To enable this support, open palabre.conf and in the section [database] change :
checkpassword = false to
checkpassword = true Then fill the lines bellow according to your database informations
dbType = mysql dbHost = localhost dbUser = root dbPassword = dbDatabase = test And specify the request to be used to connect
dBRequest = SELECT * FROM t_logins WHERE login_nickname LIKE [LOGIN] AND login_password LIKE MD5([PASSWORD]) [LOGIN] and [PASSWORD] will automaticaly be replaced with the "nickname" and "password" attributes of the connect node
So you can now use :
<connect nickname="toto" password="str0ngp4ssW0rd" /> to connect.
|