I installed Vökuró and its database. When I try to login with invalid credentials I get the following error:
[FATAL] Unhandled PDOException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value adjusted for column 'attempted' at row 1
in F:\Projekte\phalcon\sample-apps\vokuro\app\library\Auth\Auth.php on line 87
PDOStatement->execute() # line 87, file: ...\vokuro\app\library\Auth\Auth.php
phalcon\db\adapter\Pdo->executePrepared() [php-phalcon]
phalcon\db\adapter\Pdo->execute() [php-phalcon]
phalcon\db\Adapter->insert() [php-phalcon]
phalcon\mvc\Model->_doLowInsert() [php-phalcon]
phalcon\mvc\Model->save() [php-phalcon]
vokuro\auth\Auth->registerUserThrottling() # line 87, file: ...\vokuro\app\library\Auth\Auth.php
vokuro\auth\Auth->check() # line 29, file: ...\vokuro\app\library\Auth\Auth.php
vokuro\controllers\SessionController->loginAction() # line 90, file: ...\vokuro\app\controllers\SessionController.php
phalcon\Dispatcher->dispatch() [php-phalcon]
phalcon\mvc\Application->handle() [php-phalcon]
{main} # line 36, file: ...\vokuro\public\index.php
Question 1: What am I doing wrong here?
I believe Phalcon trys to save a failed login attempt. The provided DDL looks as follows:
CREATE TABLE IF NOT EXISTS `failed_logins` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`usersId` int(10) unsigned DEFAULT NULL,
`ipAddress` char(15) NOT NULL,
`attempted` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `usersId` (`usersId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
However I can't figure out what Phalcon actually tries to execute, therefore
Question 2: Can I configure the PDO adapter to show the failed SQL statement if an error occurres? If so, how?
Thank's a lot.