Wierdness with the Auth class...
| From: | Alan T. Miller | Date: | Tue, 15 Oct 2002 00:35:00 +0000 |
| Subject: | Wierdness with the Auth class... | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2497@lists.php.net to get a copy of this message | ||
I recently implemented the PEAR::Auth class in an application and for the
most part it works pretty well. I set it up to check against our current
database of users. I set the field names as instructed in the
documentation to match our database fields for the username as well as the
password.
I had successfully tested it against a half dozen known accounts and it
worked fine. However, once we went into a user testing phase people were
complaining that our system would not allow them to log in, not everyone
just a few people. For those accounts who could not log in, I check their
username and passwords manually in the database and sure enough they are
there in the database as they should be, but for some unknown reason, the
Auth class fails to authenticate those accounts.
The problem is consistent on two different development machines running
different platforms. Same data different machines, same result.
Now I am trying to debug this issue, and the first thing I wanted to check
was the actual query that the Auth container is sending to the database,
so I did my usual 'print_r' on the query before it executes the query
inside the 'fetchData()' method of the DB container, and I receive no
results on screen.
Overall, I suspect that there is an issue here with the datatypes, or
maybe extra space charachters on the database fields themselves, but am
not clear at this point on how to at least print out the query that the
Auth class is creating, and where the Auth clas is failing to authenticate
these particular users.
Any reason for this, or suggestions on what to try from here that someone
can point out?
Thanks in advance.
Alan
------
Alan T. Miller
amiller@hollywood101.com
http://www.alantmiller.com