I have the following exception Caught exception: The supplied parameters to Zend_Auth_Adapter_DbTable failed to produce a valid sql statement, please check table and colum
$dbAdapter = Zend_Db_Table::getDefaultAdapter();
$authAdapter = new Zend_Auth_Adapter_DbTable($dbAdapter);
$version = $dbAdapter->getServerVersion();
if (!is_null($version))
{
if (version_compare($version, '5.5', '>=')){
$credentialTreatment = 'CAST(SHA1(CONCAT(?, salt)) AS CHAR) AND active = 1';
}else{
$credentialTreatment = 'SHA1(CONCAT(?, salt)';
}
}
$authAdapter->setTableName('users')
->setIdentityColumn('username')
->setCredentialColumn('passwd')
->setCredentialTreatment($credentialTreatment);
return $authAdapter;
Please check this
As of MySQL 5.5.3, the return value is a nonbinary string in the connection character set. Before 5.5.3, the return value is a binary string; see the notes at the beginning of this section about using the value as a nonbinary string.
It's works for me.