0

I recently migrate my Zend Application to MariaDb. She was on MySQL.

However, i actualy this message when user authenticates :

The supplied parameters to Zend_Auth_Adapter_DbTable failed to produce a valid sql statement, please check table and column names for validity.

The PHP product code is like that :

$dbAdapter = Zend_Db_Table::getDefaultAdapter();

$adapter = new Zend_Auth_Adapter_DbTable($dbAdapter);

$adapter->setTableName('users')
        ->setIdentityColumn('username')
        ->setCredentialColumn('password')
        ->setCredentialTreatment('SHA1(CONCAT(?, passwordSalt)) AND isDeleted = 0');

$adapter->setIdentity($params['username']);
$adapter->setCredential($params['password']);

$result = $adapter->authenticate();

if ($result->isValid() === false) {
    // do something
}

I have not changed anything. What is the difference between MySQL and MariaDB for for this part.

Bastien D
  • 1,395
  • 2
  • 14
  • 26
  • 1
    Based on [this answer](http://stackoverflow.com/questions/4576637/the-supplied-parameters-to-zend-auth-adapter-dbtable-failed-to-produce-a-valid-s) the problem exists between version of mysql as well... maybe the answer there will help you in this case. – Orangepill Jul 19 '13 at 06:25

1 Answers1

0

this issue is based on mysql version.

I migrated to mariadb and changed the credential to cast a char keeping the utf8 in my config file.

-> setCredentialTreatment("CAST(MD5(CONCAT(MD5(?),salt)) AS CHAR) AND isactive='1'");

and works.