Re: Passwd Problems - Cannot Change password, no UPDATE applied
Simon Brereton <[email protected]> Fri, 23 Oct 2009 00:02:25 +0200
| Newsgroups | gmane.comp.horde.sork |
|---|---|
| Message-ID | <8AEF1088F84EE440A3004F96F838014E0CAB372C@DADAEXCCR.dadaexchange.local> |
> -----Original Message----- > From: [email protected] [mailto:[email protected]] > On Behalf Of Eric Jon Rostetter > Sent: Thursday, October 22, 2009 4:55 PM > Quoting Simon Brereton <[email protected]>: > > > I'm at a loss to see what else I can do - I wish there was a way to > > add debug lines to main.php so I could see the variable being > > returned to mail.php. > > You probably don't want it in mail.php, but in sql.php... I meant main.php - but you're right anyway ;) > It logs to the log file (syslog, or file, depending on your Horde > setup). > It should log things at the DEBUG level, so make sure you have that > enabled... > > Add lines where needed for debugging, ala: > > Horde::logMessage('SQL Query: ' . $sql, __FILE__, __LINE__, > PEAR_LOG_DEBUG); > > For example, right after line 129 of passwd/lib/Driver/sql.php were it > says: A typo, I think, I found it on line 119.. > $current_password = $row[$this->_params['pass_col']]; > > You could add: > > Horde::logMessage('Current password returned from DB as: ' . > $current_password, __FILE__, __LINE__, PEAR_LOG_DEBUG); > > > Then check the logs for what it is doing (tail -f anyone???). Of > course, > make sure you have configured Horde's logging properly... Well, of course, this was beautiful! :) This is what appeared in the logs: Oct 22 22:29:49 HORDE [debug] [passwd] SQL Query by Passwd_Driver_sql::_lookup(): SELECT Password FROM MailAccounts WHERE EmailAdd = ? [on line 110 of "/usr/share/horde3/passwd/lib/Driver/sql.php"] Oct 22 22:29:49 HORDE [debug] [passwd] Current password returned from DB as: [on line 121 of "/usr/share/horde3/passwd/lib/Driver/sql.php"] In my limited capacity, I'd have to say that the issue is the table (that is specified in the backend) isn't being selected... but of course it is - you can see that in the mysql log output... but then a friend pointed out that the ? is actually in the code! 102 if (!empty($this->_params['query_lookup'])) { 103 list($sql, $values) = $this->_parseQuery($this->_params['query_lookup'], $user, $old_password); 104 } else { 105 /* Build the SQL query. */ 106 $sql = 'SELECT ' . $this->_params['pass_col'] . ' FROM ' . $this->_params['table'] . 107 ' WHERE ' . $this->_params['user_col'] . ' = ?'; 108 $values = array($user); Does this look right? I tried to change it to %u but that didn't work :) What's the next step? Thanks. SPB -- Sork mailing list - Join the hunt: http://horde.org/bounties/#sork Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]