<p>It seems to be failing because of the date time <code>'-0001-11-30 00:00:00'</code>, which doesn't look like a proper date to me.  </p>

<p>Did you do the database dump via the Craft CMS control Panel (CP), or did you use something else like PhpMyAdmin or Sequel Pro or something? There might be something in the way you made the export that is incompatible with your lab database?</p>

<p>I always use the <code>Backup Database</code> button in the <code>Tools</code> section of the <code>Settings</code> when copying the database from one server to another.</p>

CC BY-SA 3.0
2017-03-10T00:47:30.820Z
Steve's right... the proper database date/time format is `YYYY-MM-DD HH:mm:SS`
Brad Bell
CC BY-SA 3.0
2017-03-09T12:09:48.503Z
2017-03-09T12:09:48.503Z
Steve Holland
<p>I am new to craftcms, and have installed a fresh copy. I am trying to create a lab version of our company's website.</p>

<p>I installed the fresh install, then I imported the database from sql_dump file, and copied over public folder and templates. The site looks the way its supposed to but I cannot login with any of the users in the database. It just accept it without any errors, but nothing happens. The little loading icon shows up for about 1sec and then just nothing.</p>

<p>I can still stay in the dashboard with the user I created when installing the fresh copy tho, even tho the user no longer exist. and when I go to users, I get unknown error message and non of the users from the database is there, but the admin section works fine, and I can see my admins.</p>

<p>When I go to the "craft/storage/runtime/logs/craft.log" I get this message:</p>

<pre><code>2017/03/09 07:49:55 [error] [system.db.CDbCommand] CDbCommand::execute() failed: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '-0001-11-30 00:00:00' for column 'dateCreated' at row 1. The SQL statement executed was: UPDATE `craft_users` SET `weekStartDay`=:yp0, `admin`=:yp1, `client`=:yp2, `locked`=:yp3, `suspended`=:yp4, `pending`=:yp5, `archived`=:yp6, `passwordResetRequired`=:yp7, `id`=:yp8, `username`=:yp9, `photo`=:yp10, `firstName`=:yp11, `lastName`=:yp12, `email`=:yp13, `password`=:yp14, `preferredLocale`=:yp15, `lastLoginDate`=:yp16, `lastLoginAttemptIPAddress`=:yp17, `invalidLoginWindowStart`=:yp18, `invalidLoginCount`=:yp19, `lastInvalidLoginDate`=:yp20, `lockoutDate`=:yp21, `verificationCode`=:yp22, `verificationCodeIssuedDate`=:yp23, `unverifiedEmail`=:yp24, `lastPasswordChangeDate`=:yp25, `dateCreated`=:yp26, `dateUpdated`=:yp27, `uid`=:yp28 WHERE `craft_users`.`id`=4.
2017/03/09 07:49:55 [error] [exception.CDbException] CDbException: CDbCommand klarte ikke å eksekvere SQL uttrykk: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '-0001-11-30 00:00:00' for column 'dateCreated' at row 1 in /home/vagrant/Code/Gantictest/craft/app/framework/db/CDbCommand.php:358
Stack trace:
#0 /home/vagrant/Code/Gantictest/craft/app/framework/db/ar/CActiveRecord.php(1754): CDbCommand-&gt;execute()
#1 /home/vagrant/Code/Gantictest/craft/app/framework/db/ar/CActiveRecord.php(1128): CActiveRecord-&gt;updateByPk('4', Array)
#2 /home/vagrant/Code/Gantictest/craft/app/framework/db/ar/CActiveRecord.php(810): CActiveRecord-&gt;update(NULL)
#3 /home/vagrant/Code/Gantictest/craft/app/services/UsersService.php(887): CActiveRecord-&gt;save()
#4 /home/vagrant/Code/Gantictest/craft/app/models/UserModel.php(436): Craft\UsersService-&gt;unlockUser(Object(Craft\UserModel))
#5 /home/vagrant/Code/Gantictest/craft/app/elementtypes/UserElementType.php(557): Craft\UserModel::populateModel(Array)
#6 /home/vagrant/Code/Gantictest/craft/app/services/ElementsService.php(300): Craft\UserElementType-&gt;populateElementModel(Array)
#7 /home/vagrant/Code/Gantictest/craft/app/services/ElementsService.php(226): Craft\ElementsService-&gt;populateElements(Array, Object(Craft\ElementCriteriaModel), 'content', Array)
#8 /home/vagrant/Code/Gantictest/craft/app/models/ElementCriteriaModel.php(277): Craft\ElementsService-&gt;findElements(Object(Craft\ElementCriteriaModel))
#9 /home/vagrant/Code/Gantictest/craft/app/elementtypes/BaseElementType.php(237): Craft\ElementCriteriaModel-&gt;find()
#10 /home/vagrant/Code/Gantictest/craft/app/controllers/ElementIndexController.php(371): Craft\BaseElementType-&gt;getIndexHtml(Object(Craft\ElementCriteriaModel), Array, Array, '*', 'index', true, true)
#11 /home/vagrant/Code/Gantictest/craft/app/controllers/ElementIndexController.php(105): Craft\ElementIndexController-&gt;_getElementResponseData(true, true)
#12 /home/vagrant/Code/Gantictest/craft/app/framework/web/actions/CInlineAction.php(49): Craft\ElementIndexController-&gt;actionGetElements()
#13 /home/vagrant/Code/Gantictest/craft/app/framework/web/CController.php(308): CInlineAction-&gt;runWithParams(Array)
#14 /home/vagrant/Code/Gantictest/craft/app/framework/web/CController.php(286): CController-&gt;runAction(Object(CInlineAction))
#15 /home/vagrant/Code/Gantictest/craft/app/framework/web/CController.php(265): CController-&gt;runActionWithFilters(Object(CInlineAction), Array)
#16 /home/vagrant/Code/Gantictest/craft/app/framework/web/CWebApplication.php(282): CController-&gt;run('getElements')
#17 /home/vagrant/Code/Gantictest/craft/app/etc/web/WebApp.php(817): CWebApplication-&gt;runController('elementIndex/ge...')
#18 /home/vagrant/Code/Gantictest/craft/app/etc/web/WebApp.php(287): Craft\WebApp-&gt;_processActionRequest()
#19 /home/vagrant/Code/Gantictest/craft/app/framework/base/CApplication.php(185): Craft\WebApp-&gt;processRequest()
#20 /home/vagrant/Code/Gantictest/craft/app/index.php(62): CApplication-&gt;run()
#21 /home/vagrant/Code/Gantictest/public/index.php(19): require_once('/home/vagrant/C...')
#22 {main}
REQUEST_URI=/index.php?p=admin/actions/elementIndex/getElements
HTTP_REFERER=http://gantictemp.dev/index.php?p=admin/users
</code></pre>

<p>any help in pointing me in the right direction will be much appriciated :)</p>

<users><control-panel><database><error-message><logs>
Unknown error in users section, after importing sql dump. Need help understanding logs
# Unknown error in users section, after importing sql dump. Need help understanding logs

(Asked by: username_0 on 2017-03-09)

I am new to craftcms, and have installed a fresh copy. I am trying to create a lab version of our company's website.
I installed the fresh install, then I imported the database from sql_dump file, and copied over public folder and templates. The site looks the way its supposed to but I cannot login with any of the users in the database. It just accept it without any errors, but nothing happens. The little loading icon shows up for about 1sec and then just nothing.
I can still stay in the dashboard with the user I created when installing the fresh copy tho, even tho the user no longer exist. and when I go to users, I get unknown error message and non of the users from the database is there, but the admin section works fine, and I can see my admins.
When I go to the "craft/storage/runtime/logs/craft.log" I get this message:
2017/03/09 07:49:55 [error] [system.db.CDbCommand] CDbCommand::execute() failed: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '-0001-11-30 00:00:00' for column 'dateCreated' at row 1. The SQL statement executed was: UPDATE `craft_users` SET `weekStartDay`=:yp0, `admin`=:yp1, `client`=:yp2, `locked`=:yp3, `suspended`=:yp4, `pending`=:yp5, `archived`=:yp6, `passwordResetRequired`=:yp7, `id`=:yp8, `username`=:yp9, `photo`=:yp10, `firstName`=:yp11, `lastName`=:yp12, `email`=:yp13, `password`=:yp14, `preferredLocale`=:yp15, `lastLoginDate`=:yp16, `lastLoginAttemptIPAddress`=:yp17, `invalidLoginWindowStart`=:yp18, `invalidLoginCount`=:yp19, `lastInvalidLoginDate`=:yp20, `lockoutDate`=:yp21, `verificationCode`=:yp22, `verificationCodeIssuedDate`=:yp23, `unverifiedEmail`=:yp24, `lastPasswordChangeDate`=:yp25, `dateCreated`=:yp26, `dateUpdated`=:yp27, `uid`=:yp28 WHERE `craft_users`.`id`=4.
2017/03/09 07:49:55 [error] [exception.CDbException] CDbException: CDbCommand klarte ikke å eksekvere SQL uttrykk: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '-0001-11-30 00:00:00' for column 'dateCreated' at row 1 in /home/vagrant/Code/Gantictest/craft/app/framework/db/CDbCommand.php:358
Stack trace:
#0 /home/vagrant/Code/Gantictest/craft/app/framework/db/ar/CActiveRecord.php(1754): CDbCommand->execute()
#1 /home/vagrant/Code/Gantictest/craft/app/framework/db/ar/CActiveRecord.php(1128): CActiveRecord->updateByPk('4', Array)
#2 /home/vagrant/Code/Gantictest/craft/app/framework/db/ar/CActiveRecord.php(810): CActiveRecord->update(NULL)
#3 /home/vagrant/Code/Gantictest/craft/app/services/UsersService.php(887): CActiveRecord->save()
#4 /home/vagrant/Code/Gantictest/craft/app/models/UserModel.php(436): Craft\UsersService->unlockUser(Object(Craft\UserModel))
#5 /home/vagrant/Code/Gantictest/craft/app/elementtypes/UserElementType.php(557): Craft\UserModel::populateModel(Array)
#6 /home/vagrant/Code/Gantictest/craft/app/services/ElementsService.php(300): Craft\UserElementType->populateElementModel(Array)
#7 /home/vagrant/Code/Gantictest/craft/app/services/ElementsService.php(226): Craft\ElementsService->populateElements(Array, Object(Craft\ElementCriteriaModel), 'content', Array)
#8 /home/vagrant/Code/Gantictest/craft/app/models/ElementCriteriaModel.php(277): Craft\ElementsService->findElements(Object(Craft\ElementCriteriaModel))
#9 /home/vagrant/Code/Gantictest/craft/app/elementtypes/BaseElementType.php(237): Craft\ElementCriteriaModel->find()
#10 /home/vagrant/Code/Gantictest/craft/app/controllers/ElementIndexController.php(371): Craft\BaseElementType->getIndexHtml(Object(Craft\ElementCriteriaModel), Array, Array, '*', 'index', true, true)
#11 /home/vagrant/Code/Gantictest/craft/app/controllers/ElementIndexController.php(105): Craft\ElementIndexController->_getElementResponseData(true, true)
#12 /home/vagrant/Code/Gantictest/craft/app/framework/web/actions/CInlineAction.php(49): Craft\ElementIndexController->actionGetElements()
#13 /home/vagrant/Code/Gantictest/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#14 /home/vagrant/Code/Gantictest/craft/app/framework/web/CController.php(286): CController->runAction(Object(CInlineAction))
#15 /home/vagrant/Code/Gantictest/craft/app/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#16 /home/vagrant/Code/Gantictest/craft/app/framework/web/CWebApplication.php(282): CController->run('getElements')
#17 /home/vagrant/Code/Gantictest/craft/app/etc/web/WebApp.php(817): CWebApplication->runController('elementIndex/ge...')
#18 /home/vagrant/Code/Gantictest/craft/app/etc/web/WebApp.php(287): Craft\WebApp->_processActionRequest()
#19 /home/vagrant/Code/Gantictest/craft/app/framework/base/CApplication.php(185): Craft\WebApp->processRequest()
#20 /home/vagrant/Code/Gantictest/craft/app/index.php(62): CApplication->run()
#21 /home/vagrant/Code/Gantictest/public/index.php(19): require_once('/home/vagrant/C...')
#22 {main}
REQUEST_URI=/index.php?p=admin/actions/elementIndex/getElements
HTTP_REFERER=http://gantictemp.dev/index.php?p=admin/users

any help in pointing me in the right direction will be much appriciated :)

**Tags:** users, control-panel, database, error-message, logs


---

## 1 answers

### Answer by username_1 on 2017-03-09. Score: 2

It seems to be failing because of the date time `'-0001-11-30 00:00:00'`, which doesn't look like a proper date to me.

Did you do the database dump via the Craft CMS control Panel (CP), or did you use something else like PhpMyAdmin or Sequel Pro or something? There might be something in the way you made the export that is incompatible with your lab database?

I always use the `Backup Database` button in the `Tools` section of the `Settings` when copying the database from one server to another.

> **Comments:**
> **username_2**: Steve's right... the proper database date/time format is `YYYY-MM-DD HH:mm:SS`  

---

