We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

get SQLSTATE[22001]

Hello,

i get this error since today, but i changed nothing. I moved to my live server and last days it worked, today i can't login.

32767SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'userAgent' at row 1
#0 [internal function]: PDOStatement->execute()
#1 [internal function]: Phalcon\Db\Adapter\Pdo->executePrepared(Object(PDOStatement), Array, Array)
#2 [internal function]: Phalcon\Db\Adapter\Pdo->execute('INSERT INTO `su...', Array, Array)
#3 [internal function]: Phalcon\Db\Adapter->insert('success_logins', Array, Array, Array)
#4 [internal function]: Phalcon\Mvc\Model->_doLowInsert(Object(Phalcon\Mvc\Model\MetaData\Files), Object(Phalcon\Db\Adapter\Pdo\Mysql), 'success_logins', 'id')
#5 /var/www/vhosts/web/app/library/Auth/Auth.php(77): Phalcon\Mvc\Model->save()
#6 /var/www/vhosts/web/app/library/Auth/Auth.php(46): Vokuro\Auth\Auth->saveSuccessLogin(Object(Vokuro\Models\Users))
#7 /var/www/vhosts/web/app/controllers/IndexController.php(212): Vokuro\Auth\Auth->check(Array)
#8 [internal function]: Vokuro\Controllers\IndexController->loginRegisterAction()
#9 [internal function]: Phalcon\Dispatcher->callActionMethod(Object(Vokuro\Controllers\IndexController), 'loginRegisterAc...', Array)
#10 [internal function]: Phalcon\Dispatcher->dispatch()
#11 /var/www/vhosts/web/public/index.php(45): Phalcon\Mvc\Application->handle()
#12 {main}

Rgds Stefan



59.9k
Accepted
answer

ok found it :-)

I need to increase "userAgent" varchar 120 to 255 in table "success_logins"