Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Solved] Fatal Error in Gdn_Database.Query*

CanduncCandunc New
edited October 2012 in Vanilla 2.0 - 2.8

Hello, I am trying to host a forum, but whenever I try to create one this shows up:
(Website taken down until fix found)

Fatal Error in Gdn_Database.Query();

[Duplicate entry '1' for key 'PRIMARY'
update GDN_User User set 
 Name = :Name,
 Password = :Password,
 Email = :Email,
 ShowEmail = :ShowEmail,
 Gender = :Gender,
 DateOfBirth = :DateOfBirth,
 DateFirstVisit = :DateFirstVisit,
 DateLastActive = :DateLastActive,
 DateInserted = :DateInserted,
 DateUpdated = :DateUpdated,
 Admin = :Admin,
 UserID = :UserID
The error occurred on or near: B:\Website\Forum1\library\database\class.database.php
277:          if (!is_object($PDOStatement)) {
278:             trigger_error(ErrorMessage('PDO Statement failed to prepare', $this->ClassName, 'Query', $this->GetPDOErrorMessage($this->Connection()->errorInfo())), E_USER_ERROR);
279:          } else if ($PDOStatement->execute($InputParameters) === FALSE) {
280:             trigger_error(ErrorMessage($this->GetPDOErrorMessage($PDOStatement->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR);
281:          }
282:       } else {
283:          $PDOStatement = $this->Connection()->query($Sql);
284:       }
[B:\Website\Forum1\library\database\class.database.php:280] PHP::trigger_error();
[B:\Website\Forum1\library\database\class.sqldriver.php:1650] Gdn_Database->Query();
[B:\Website\Forum1\library\database\class.sqldriver.php:1619] Gdn_SQLDriver->Query();
[B:\Website\Forum1\applications\dashboard\models\class.usermodel.php:968] Gdn_SQLDriver->Put();
[B:\Website\Forum1\applications\dashboard\controllers\class.setupcontroller.php:214] UserModel->SaveAdminUser();
[B:\Website\Forum1\applications\dashboard\controllers\class.setupcontroller.php:71] SetupController->Configure();
[B:\Website\Forum1\applications\dashboard\controllers\class.setupcontroller.php:71] SetupController->Index();
[B:\Website\Forum1\library\core\class.dispatcher.php:322] PHP::call_user_func_array();
[B:\Website\Forum1\index.php:53] Gdn_Dispatcher->Dispatch();


  • Options
    UnderDogUnderDog MVP
    edited October 2012

    I snipped the part of the error message for you, that is less interesting for solving this problem

    Did you install and then try to install again on the same database?
    In the database table that the user wants to be inserted, there is already at least 1 user record, so something must be wrong there...

    What I would do is:

    • create a totally new database
    • Set up Vanilla one more time using the same settings in that totally clean, new database
    • If that fails, prepare to let one of the experienced users here on the forum take a look at it, meaning a way to look on your server (Windows?) and having a way to look in your MySQL system (phpMyAdmin?)

    Just to make sure... did you download and install (latest stable from 'Download' button on top of the site)

    There was an error rendering this rich post.

  • Options

    Thanks, I deleted the database and made a new one. It works now.

Sign In or Register to comment.