[PARTIAL SOLVED] Re: Auth user with postgresql
gt0057 at gmail.com
Mon Feb 20 23:38:15 UTC 2012
Unfortunately the problem is partially solved.
postgres_query "SELECT user FROM usertable "WHERE user=$user AND
The crypt function in postgresql works correctly only with the
password created by the htpasswd program, but do not work with
passwords created by PHP.
Best regards, and many thanks.
2012/2/18 Piotr Sikora <piotr.sikora at frickle.com>:
>> Hi reason, the password is not in MD5, but rather in DES (PHP -->
>> crypt($verpas, CRYPT_STD_DES)
>> What should I use instead of set_md5 ?
>> DES on this page http://wiki.nginx.org/HttpSetMiscModule#Installation
>> is never mentioned
> I'm not aware of any module that would offer crypt() hashing for variables
> in nginx.conf.
> On the bright side, PostgreSQL's crypt()  should help you. Could you
> please try:
> postgres_query "SELECT user FROM usertable
> "WHERE user=$user AND pwd=crypt($pass, pwd)";
>  http://www.postgresql.org/docs/9.1/static/pgcrypto.html
> Best regards,
> Piotr Sikora < piotr.sikora at frickle.com >
> nginx mailing list
> nginx at nginx.org
More information about the nginx